aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/georgi/sten.h
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/georgi/sten.h')
-rw-r--r--keyboards/georgi/sten.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/keyboards/georgi/sten.h b/keyboards/georgi/sten.h
index 5a9771d9a..e94f10fc2 100644
--- a/keyboards/georgi/sten.h
+++ b/keyboards/georgi/sten.h
@@ -13,6 +13,9 @@
extern size_t keymapsCount; // Total keymaps
extern uint32_t cChord; // Current Chord
+extern uint32_t stenoLayers[]; // Chords that simulate QMK layers
+extern size_t stenoLayerCount; // Number of simulated layers
+uint32_t refChord; // Reference chord for PC macro
// Function defs
void processChord(bool useFakeSteno);
@@ -30,6 +33,11 @@ void CLICK_MOUSE(uint8_t);
// Keymap helper
#define P(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;}
+#define PC(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;} \
+ for(int i = 0; i < stenoLayerCount; i++) { \
+ refChord = stenoLayers[i] | chord; \
+ if (cChord == (refChord)) { if (!lookup) {act;} return refChord;}; \
+}
// Shift to internal representation
// i.e) S(teno)R(ight)F