Flex Editor User Manual

File Workflow

Use File > New to start from packaged templates.

The packaged starter templates are signed SK5301-100-12 AppSetting and AppLiveSetting templates.

Use File > Open... to open a raw AppSetting/AppLiveSetting .bin file or a signed .flex package. When a matching companion .bin or .flex file is present, Flex Editor loads the pair together.

When opening a signed .flex package, Flex Editor first checks for the shared <base>.pubkey beside the package pair. If that key is not present, Flex Editor checks the selected package's own <filebase>.pubkey. If no sidecar public key is present, Flex Editor verifies the package with the built-in Sprintek public key.

Use File > Save or File > Save As... to write raw .bin payloads.

SK5301 Configuration Editing

Flex Editor edits SK5301 AppSetting and AppLiveSetting payloads. AppSetting controls the keyboard scan configuration, matrix tables, SKey definitions, SFunc behavior, LED/backlight behavior, and signing/export data. AppLiveSetting controls runtime-adjustable values such as sequence number, backlight level, clean-reminder level, and the hold-keyboard-lock SKey.

The SK5301 keyboard scan is organized as rows and columns. A physical switch position is identified as R<row>C<column>. The AppSetting matrix tables contain one SKey number for each switch position. When the firmware detects a make or break event at a switch position, it reads the active matrix table at that same row and column, obtains the SKey number, and then interprets that SKey through the SKey table.

Matrix0 Through Matrix3

The Matrix0, Matrix1, Matrix2, and Matrix3 tabs are four alternate SKey lookup tables for the same physical switch grid. They are selected by two runtime state bits:

M1 M0 Active matrix
0 0 Matrix0
0 1 Matrix1
1 0 Matrix2
1 1 Matrix3

Each matrix tab shows rows R0 through R7 and columns C0 through C23. Current SK5301 scan firmware reads physical columns C0 through C19; columns C20 through C23 are retained in the AppSetting layout for compatibility/reserved use.

Each matrix cell stores an SKey number. For example, assigning 04 - A to R2C5 means that pressing the physical switch wired to row 2, column 5 produces SKey A when that matrix is active. Assigning 00 - Null disables that switch position for that matrix.

Matrix selection is controlled by SFunc actions:

The selector state is captured when a physical key press is debounced. The matching key release uses the same captured state, so changing M0 or M1 while another key is already held does not make that held key release through a different matrix.

Common layout patterns:

SKey Table And SKey Editor

The SKey tab defines what each SKey number means. Matrix cells point to SKey numbers; the SKey table defines the output or behavior behind those numbers. Double-click an editable SKey row, or use its Edit button, to open the SKey editor window.

SKey 00 is Null and produces no output. Standard SKeys map to USB keyboard, system, consumer, or telephony usages. Custom SKeys are intended for project-specific functions, macros, and alternate behavior.

The SKey editor supports these key types:

SKey type Use
Normal Sends one USB/I2C usage and related PS/2 scan-code information.
FnShift, FnLockShift, NumLockShift Chooses between a shift-off and shift-on SKey, with optional modifier bits.
Macro Sends a sequence or make/break group of SKeys, optionally using a continuation entry for more SKeys.
MacroTimer Starts a hold or delay timer, then emits a modifier plus SKey action when the timer rule is satisfied.
MacroRotate Rotates through a list of SKeys each time the key is used. Timer-sequence mode emits after timeout or before another key; switch modes emit on key action.
Func Runs one or more SFunc actions, optionally with a normal modifier plus SKey output. Each function can be enabled for make, break, or both events.
FuncMP Runs a multi-parameter function. The supported customer-facing mode is KbLockCleanRemind.

Built-in SK5301 custom examples:

SKey type Example setup Result
Normal The built-in Custom0-Custom41 set does not include a non-null Normal custom example. Use a standard SKey such as 04 - A as the Normal reference, or configure an unused custom entry with USB page 07 Keyboard and code 04. A matrix cell assigned to that SKey sends the keyboard A usage when pressed.
FnShift Cust7: Fn off F3, Fn on F13. Cust8: Fn off LCtrl+F4, Fn on LCtrl+F14. The same matrix key changes output while Fn is active.
FnLockShift Cust5: FnLock off F1, FnLock on F11. Cust6: FnLock off LCtrl+F2, FnLock on LCtrl+F12. The output changes according to the combined Fn/FnLock state.
NumLockShift Cust3: NumLock off F1, NumLock on F11. Cust4: NumLock off LCtrl+F2, NumLock on LCtrl+F12. The output follows NumLock state.
Macro Cust9, Cust10, Cust11/Cust12, and Cust13 demonstrate macro behavior. The key emits a modifier/key group or a sequence depending on the selected macro mode.
MacroTimer Cust14 through Cust17 demonstrate the four MacroTimer modes. The key emits the configured output only after the hold or delay rule is satisfied.
MacroRotate Cust20 through Cust23 demonstrate the MacroRotate modes. Each use advances through the configured SKey list.
Func Cust1 toggles GPO15 on make. Cust2 combines RAlt+F2 output with GPO15 high functions. Built-in SKeys MatrixSelM1 and MatrixSelM0 are also Func keys. The key runs SFunc actions, optionally with normal key output.
FuncMP Cust40/Cust41 define KbLockCleanRemind; Cust41 is the continuation entry containing clean-reminder intervals. The key enters keyboard-lock and clean-reminder behavior using the configured timing values.

Mode details:

Macro Modes

Macro keys send a configured list of SKeys. Enable Double Entry when the macro needs more SKey slots than fit in the first entry.

Mode Description Example setup Result
MakeBreak Treats the listed SKeys as a make/break group. The macro presses the listed keys on key make and releases them on key break. Built-in Cust9: LCtrl+LAlt+Del. Built-in Cust13: LShift+C, LShift+O, K, E. Cust9 behaves like holding Ctrl+Alt+Del; Cust13 demonstrates a make/break macro spelling COKE with shifted letters where configured.
Sequence Sends the listed SKeys as a press/release sequence from first to last. Built-in Cust10: D0, D0, D0. Built-in Cust11/Cust12: double-entry sequence for APPLE JUICE. Cust10 sends 000. Cust11 uses Cust12 as its continuation entry to send a longer text sequence.

MacroTimer Modes

MacroTimer keys use a timer before emitting a modifier plus SKey action. Timer IDs 4 through 7 are available for macro timer use.

Mode Description Example setup Result
MakeBreak Hold Starts timing while the key is held. If the key remains held until timeout, emits the configured make/break action. Built-in Cust14: timer 5, timeout 6, primary output RCtrl+RShift+F1, timeout output RCtrl+LShift+F11. Holding the key long enough emits the timeout action; releasing early cancels the hold action.
Sequence Hold Starts timing while the key is held. If the key remains held until timeout, emits the configured action as a sequence. Built-in Cust15: timer 5, timeout 6, primary output RCtrl+RShift+F2, timeout output LCtrl+LShift+F12. Holding the key long enough sends the configured sequence; releasing early cancels it.
MakeBreak Delay Starts timing on key action and emits the make/break action after the delay. Built-in Cust16: timer 5, timeout 6, primary output RCtrl+RShift+F3, delayed output LCtrl+LShift+F13. Pressing the key schedules the delayed make/break action.
Sequence Delay Starts timing on key action and emits the configured action as a sequence after the delay. Built-in Cust17: timer 5, timeout 6, primary output RCtrl+RShift+F4, delayed output LCtrl+LShift+F14. Pressing the key sends the configured sequence after the delay.

MacroRotate Modes

MacroRotate keys keep a rotation position for the SKey list. Each use advances to the next non-null SKey; when the next slot is Null, the rotation returns to the first slot.

Mode Description Example setup Result
TimerSequence Advances the rotation on each press but delays output. The selected SKey is emitted as a modifier plus SKey make/break sequence when the timer expires, or before another key forces the pending output to flush. Built-in Cust22: timeout 3, rotates A, B, C. Built-in Cust23: timeout 3, rotates D, E, F. Repeated presses choose the next letter; output occurs after the timeout or when flushed by another key.
SwitchMakeBreak Advances the rotation and emits the selected modifier plus SKey using key make/break behavior. Built-in Cust20: modifier RCtrl, rotates F1, F2, F3. First press behaves like RCtrl+F1, second like RCtrl+F2, third like RCtrl+F3, then repeats.
SwitchSequence Advances the rotation and emits the selected modifier plus SKey as a sequence on key make. Built-in Cust21: modifier RCtrl, rotates F1, F2, F3. Each press sends one complete sequence: RCtrl+F1, then RCtrl+F2, then RCtrl+F3, then repeats.

For Normal keys, choose the USB page and usage code. Page 07 is the normal keyboard page, page 01 is system control, page 0C is consumer control, and page 0B is telephony. The PS/2 fields are for PS/2 compatibility and relay behavior. The I2C fields mirror the same page/code idea for I2C output.

For shift-type keys, the editor stores a shift-off output and a shift-on output. FnShift follows Fn state, FnLockShift follows the combined Fn/FnLock rule, and NumLockShift follows NumLock state.

For Func keys, choose SFunc operations such as Fn, FnLock, MatrixSelM0, MatrixSelM1, backlight control, bit set/clear/toggle, GPO control, or timer control. Function rows with parameters use the parameter byte shown beside the function. Make and break checkboxes decide whether the function runs on press, release, or both.

For macros and rotate macros, avoid selecting a row marked as a continuation entry. Continuation entries are owned by the previous double-entry SKey and should not be assigned directly in matrix cells.

Signed Package Export

Use File > Export Signed Package... to create signed packages:

*_setting.flex
*_livesetting.flex

Flex Editor requires saved raw payload files before signing. The signed package is written beside the raw payload.

The shared public key is copied once beside the signed package pair:

*.pubkey

Keep the .pubkey file with the signed .flex package files. Flex Programmer uses the public key to verify that the setting package was signed by the expected customer key before programming the device.

Flex Editor also appends signing traceability records to:

signed-export-records.jsonl

Customer Keys

Use File > Preferences... to select customer private and public key files.

When Flex Key is bundled, use Generate Key... to create an Ed25519 customer transport signing key pair. Release packages normally include Flex Key under:

tools/flex-sign/flexkey.exe
tools/flex-sign/flexkey

Flex Key creates a pair of files:

Handle the files as a pair for setup, but distribute them differently:

Ed25519 customer transport signing keys are stateless. They do not have an LMS-style signing counter, so there is no signing-state file to advance or preserve. The private key still represents the customer's signing authority and should be protected as confidential material.

When moving a signed setting package to another computer, move the signed .flex file and the matching public key sidecar together. Do not move the private key unless that computer is an approved signing station.

Flex Sign Tools

When bundled, Flex Editor uses:

tools/flex-sign/flexsign.exe
tools/flex-sign/flexkey.exe
tools/flex-sign/flexsign
tools/flex-sign/flexkey

If the bundled tools are not present, Flex Editor can use FLEX_EDITOR_FLEX_SIGN, a saved signing-tool preference, or flexsign from PATH.

Payload Extraction

Use File > Extract Raw Payload From Signed Package... to recover the raw payload from a signed .flex package after signature verification.

Updates

Check for updates at:

https://www.sprintek.com/en/support/Downloads.aspx