Clean-room ZMK steno engine with trie/DAWG dictionary
Find a file
afiqzudinhadi 1d5bef3129 Revert to v2 format, fix CHD with more displacement tries
Spare slots (1.23x) doubled binary size → reverted to v2 (no spare
slots, entry_count == slot_count). CHD now uses entry_count/4
buckets and 1M displacement tries instead of 65K. No trimming.
2026-07-02 15:47:23 +08:00
dicts Steno engine with BLE split-storage architecture 2026-07-02 02:06:37 +08:00
dts Steno engine with BLE split-storage architecture 2026-07-02 02:06:37 +08:00
include/dt-bindings/zmk Steno engine with BLE split-storage architecture 2026-07-02 02:06:37 +08:00
src Revert to v2 format, fix CHD with more displacement tries 2026-07-02 15:47:23 +08:00
tests Steno engine with BLE split-storage architecture 2026-07-02 02:06:37 +08:00
tools Revert to v2 format, fix CHD with more displacement tries 2026-07-02 15:47:23 +08:00
zephyr Steno engine with BLE split-storage architecture 2026-07-02 02:06:37 +08:00
.gitignore Steno engine with BLE split-storage architecture 2026-07-02 02:06:37 +08:00
CMakeLists.txt True split-dict: partition dictionary across both halves 2026-07-02 14:27:37 +08:00
Kconfig Never trim dictionary — hard error if over budget 2026-07-02 15:39:52 +08:00
LICENSE Steno engine with BLE split-storage architecture 2026-07-02 02:06:37 +08:00
README.md Steno engine with BLE split-storage architecture 2026-07-02 02:06:37 +08:00

zmk-steno-engine

Clean-room stenography engine for ZMK Firmware. Dictionary-based lookup with multi-stroke support, optimized for nRF52840 flash constraints.

Status: Early development — basic single/multi-stroke lookup works, formatter not yet implemented.

Features

  • Standard 23-key steno layout
  • Sorted-array dictionary with binary search lookup
  • Multi-stroke support with configurable timeout
  • All-up chord detection
  • HID keyboard output (ASCII)
  • Build-time dictionary compilation from Plover JSON
  • Test dictionary included for development

Building

Add as a ZMK module in your west.yml:

manifest:
  remotes:
    - name: zmk-steno-engine
      url-base: https://github.com/afiqzudinhadi
  projects:
    - name: zmk-steno-engine
      remote: zmk-steno-engine
      revision: optimize-dict

Enable in your .conf:

CONFIG_STENO_ENGINE=y

Use in your keymap:

#include <dt-bindings/zmk/steno_keys.h>

/ {
    keymap {
        steno_layer {
            bindings = <
                &steno STENO_SL  &steno STENO_TL  &steno STENO_PL  ...
            >;
        };
    };
};

Dictionary Compiler

# Compile test dictionary
python3 tools/compile_simple.py dicts/test.json -o steno_dict.bin --stats

# Compile Plover dictionary (trimmed)
python3 tools/compile_simple.py plover-main.json -o steno_dict.bin --max-entries 120000 --stats

License

PolyForm Noncommercial 1.0.0