aboutsummaryrefslogtreecommitdiff
path: root/keymap-wrapper.h
diff options
context:
space:
mode:
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)