summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorJack & Erez <bulk@ezuk.org>2016-10-12 22:18:27 -0400
committerErez Zukerman <ezukerman@godaddy.com>2016-10-12 22:18:27 -0400
commite27a754b70434de88a37c4a572e4ca5f7730ff58 (patch)
treee2b64bad2b358ff294a6d7bbb7514d3126d08489 /quantum
parent698d02122b2f705eb57d177e567c059289c6d7f8 (diff)
[Jack & Erez] Simplifies and documents TO
Diffstat (limited to 'quantum')
-rw-r--r--quantum/keymap.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/quantum/keymap.h b/quantum/keymap.h
index 4b2192cb2e..85c090972d 100644
--- a/quantum/keymap.h
+++ b/quantum/keymap.h
@@ -296,7 +296,10 @@ enum quantum_keycodes {
// ON_PRESS = 1
// ON_RELEASE = 2
// Unless you have a good reason not to do so, prefer ON_PRESS (1) as your default.
-#define TO(layer, when) (layer | QK_TO | (when << 0x4))
+// In fact, we changed it to assume ON_PRESS for sanity/simplicity. If needed, you can add your own
+// keycode modeled after the old version, kept below for this.
+/* #define TO(layer, when) (layer | QK_TO | (when << 0x4)) */
+#define TO(layer) (layer | QK_TO | (ON_PRESS << 0x4))
// Momentary switch layer - 256 layer max
#define MO(layer) (layer | QK_MOMENTARY)