diff options
author | Jack & Erez <bulk@ezuk.org> | 2016-10-12 22:18:27 -0400 |
---|---|---|
committer | Erez Zukerman <ezukerman@godaddy.com> | 2016-10-12 22:18:27 -0400 |
commit | e27a754b70434de88a37c4a572e4ca5f7730ff58 (patch) | |
tree | e2b64bad2b358ff294a6d7bbb7514d3126d08489 /quantum | |
parent | 698d02122b2f705eb57d177e567c059289c6d7f8 (diff) | |
download | qmk_firmware-e27a754b70434de88a37c4a572e4ca5f7730ff58.tar.gz qmk_firmware-e27a754b70434de88a37c4a572e4ca5f7730ff58.zip |
[Jack & Erez] Simplifies and documents TO
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/keymap.h | 5 |
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) |