aboutsummaryrefslogtreecommitdiff
path: root/keymap-wrapper.h
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2021-12-20 14:15:45 +0000
committerdakkar <dakkar@thenautilus.net>2021-12-20 14:15:45 +0000
commit994e5b2291b2e592b1291a68d5e94d3613c72da2 (patch)
tree10d093b6a534d4ccbfc4bbc02326c333dad41e8a /keymap-wrapper.h
parentfvwm "num" is "screenshot" (diff)
downloadkeyboardio-model01-994e5b2291b2e592b1291a68d5e94d3613c72da2.tar.gz
keyboardio-model01-994e5b2291b2e592b1291a68d5e94d3613c72da2.tar.bz2
keyboardio-model01-994e5b2291b2e592b1291a68d5e94d3613c72da2.zip
some docs / comments
Diffstat (limited to 'keymap-wrapper.h')
-rw-r--r--keymap-wrapper.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/keymap-wrapper.h b/keymap-wrapper.h
index 87326ca..9418ebb 100644
--- a/keymap-wrapper.h
+++ b/keymap-wrapper.h
@@ -4,6 +4,23 @@
#include "Kaleidoscope-MouseKeys.h"
#include "keymap-layers.h"
+/* hack hack hack!
+
+ for each layer, we need 2 arrays: one for the keys, one for the
+ colours. But we want to defined each key next to its
+ colour. Therefore we write our keymap using the CK and ColorKeymaps
+ macros, and include this file.
+
+ First, we define CK as "return the first argument (the key)", and
+ ColorKeymaps as "a klaeidoscope keymap", and include our keymaps
+ definition.
+
+ Then, we *redefine* CK as "return the second argument (the colour)"
+ and ColorKeymaps as "a DakkarColor color map", and include our
+ keymaps definition *again* (make sure you don't add a `#pragma
+ "once"` in there!)
+ */
+
#define CK(k,c) k
#define ColorKeymaps(layers...) KEYMAPS(layers)