Skip to content

Commit 4dfef5c

Browse files
authored
Initial rework of steno feature (qmk#26273)
1 parent 4b2c8b3 commit 4dfef5c

21 files changed

Lines changed: 1550 additions & 399 deletions

builddefs/common_features.mk

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -102,23 +102,25 @@ STENO_PROTOCOL ?= all
102102
ifeq ($(strip $(STENO_ENABLE)), yes)
103103
ifeq ($(filter $(STENO_PROTOCOL),$(VALID_STENO_PROTOCOL_TYPES)),)
104104
$(call CATASTROPHIC_ERROR,Invalid STENO_PROTOCOL,STENO_PROTOCOL="$(STENO_PROTOCOL)" is not a valid stenography protocol)
105-
else
106-
OPT_DEFS += -DSTENO_ENABLE
107-
VIRTSER_ENABLE ?= yes
105+
endif
108106

109-
ifeq ($(strip $(STENO_PROTOCOL)), geminipr)
110-
OPT_DEFS += -DSTENO_ENABLE_GEMINI
111-
endif
112-
ifeq ($(strip $(STENO_PROTOCOL)), txbolt)
113-
OPT_DEFS += -DSTENO_ENABLE_BOLT
114-
endif
115-
ifeq ($(strip $(STENO_PROTOCOL)), all)
116-
OPT_DEFS += -DSTENO_ENABLE_ALL
117-
OPT_DEFS += -DSTENO_ENABLE_GEMINI
118-
OPT_DEFS += -DSTENO_ENABLE_BOLT
119-
endif
107+
ifeq ($(strip $(STENO_PROTOCOL)), all)
108+
override STENO_PROTOCOL := $(filter-out all,$(VALID_STENO_PROTOCOL_TYPES))
109+
OPT_DEFS += -DSTENO_ENABLE_ALL
110+
endif
111+
112+
OPT_DEFS += -DNUM_STENO_PROTOCOLS=$(words $(sort $(STENO_PROTOCOL)))
120113

121-
SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c
114+
# for each supported protocol -> add deps
115+
ifneq ($(filter $(STENO_PROTOCOL),geminipr),)
116+
OPT_DEFS += -DSTENO_ENABLE_GEMINI
117+
SRC += $(QUANTUM_DIR)/steno/steno_gemini.c
118+
VIRTSER_ENABLE ?= yes
119+
endif
120+
ifneq ($(filter $(STENO_PROTOCOL),txbolt),)
121+
OPT_DEFS += -DSTENO_ENABLE_BOLT
122+
SRC += $(QUANTUM_DIR)/steno/steno_bolt.c
123+
VIRTSER_ENABLE ?= yes
122124
endif
123125
endif
124126

builddefs/generic_features.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ GENERIC_FEATURES = \
5252
SEND_STRING \
5353
SEQUENCER \
5454
SPACE_CADET \
55+
STENO \
5556
SWAP_HANDS \
5657
TAP_DANCE \
5758
TRI_LAYER \
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"ranges": {
3+
"0x74C0/0x003F": "!delete!", // Old QK_STENO
4+
"0x74C0/0x005F": {
5+
"define": "QK_STENO"
6+
}
7+
}
8+
}

0 commit comments

Comments
 (0)