Implement Phase 2: real platform shims + behavior driver + steno key defines
- zmk_key_shim: Key::Press/Release → raise_zmk_keycode_state_changed() Maps Javelin KeyCode to ZMK HID events (keyboard + consumer pages) - zmk_clock_shim: Clock:: → Zephyr k_uptime_get/k_cyc_to_us/k_msleep - zmk_flash_shim: Flash::EraseBlock/WriteBlock → Zephyr flash API - behavior_javelin_steno.c: proper DT_DRV_COMPAT, DT_INST_FOREACH_STATUS_OKAY - engine_init.cc: processor pipeline wiring (AllUp → JeffModifiers → Engine) - javelin_steno.dtsi: default &javsteno behavior instance - dt-bindings/zmk/javelin_steno.h: STENO_S1..STENO_ZR key defines for keymaps - Exclude thread.cc (pthreads), key.cc, clock.cc (replaced by shims) - Fix CMake: combine COMPILE_FLAGS + COMPILE_DEFINITIONS in single call Engine init deferred until dictionary loaded (Phase 3).
This commit is contained in:
parent
206e5231e1
commit
d4dc836b52
9 changed files with 213 additions and 73 deletions
41
include/dt-bindings/zmk/javelin_steno.h
Normal file
41
include/dt-bindings/zmk/javelin_steno.h
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
// Steno key indices matching Javelin's StenoKey enum.
|
||||
// Use in keymap: &javsteno STENO_S1, &javsteno STENO_TL, etc.
|
||||
|
||||
#define STENO_S1 0
|
||||
#define STENO_S2 1
|
||||
#define STENO_TL 2
|
||||
#define STENO_KL 3
|
||||
#define STENO_PL 4
|
||||
#define STENO_WL 5
|
||||
#define STENO_HL 6
|
||||
#define STENO_RL 7
|
||||
#define STENO_A 8
|
||||
#define STENO_O 9
|
||||
#define STENO_STAR1 10
|
||||
#define STENO_STAR2 11
|
||||
#define STENO_STAR3 12
|
||||
#define STENO_STAR4 13
|
||||
#define STENO_E 14
|
||||
#define STENO_U 15
|
||||
#define STENO_FR 16
|
||||
#define STENO_RR 17
|
||||
#define STENO_PR 18
|
||||
#define STENO_BR 19
|
||||
#define STENO_LR 20
|
||||
#define STENO_GR 21
|
||||
#define STENO_TR 22
|
||||
#define STENO_SR 23
|
||||
#define STENO_DR 24
|
||||
#define STENO_ZR 25
|
||||
#define STENO_NUM1 26
|
||||
#define STENO_NUM2 27
|
||||
#define STENO_NUM3 28
|
||||
#define STENO_NUM4 29
|
||||
#define STENO_NUM5 30
|
||||
#define STENO_NUM6 31
|
||||
#define STENO_NUM7 32
|
||||
#define STENO_NUM8 33
|
||||
#define STENO_NUM9 34
|
||||
#define STENO_NUM10 35
|
||||
#define STENO_NUM11 36
|
||||
#define STENO_NUM12 37
|
||||
|
|
@ -9,4 +9,12 @@ void zmk_javelin_steno_process_key(int steno_key_index, bool is_press);
|
|||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
class StenoDictionary;
|
||||
struct StenoOrthography;
|
||||
|
||||
// Complete engine initialization with loaded dictionary.
|
||||
// Called from dictionary loading code once flash data is validated.
|
||||
void zmk_javelin_steno_init_engine(StenoDictionary &dictionary,
|
||||
const StenoOrthography &orthography);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue