diff options
| -rw-r--r-- | quantum/keymap_common.c | 4 | ||||
| -rw-r--r-- | quantum/keymap_common.h | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index da7527172..fc889a308 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c | |||
| @@ -118,6 +118,10 @@ action_t action_for_key(uint8_t layer, keypos_t key) | |||
| 118 | action_t action; | 118 | action_t action; |
| 119 | action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); | 119 | action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); |
| 120 | return action; | 120 | return action; |
| 121 | } else if (keycode >= 0x8000 && keycode < 0x9000) { | ||
| 122 | action_t action; | ||
| 123 | action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); | ||
| 124 | return action; | ||
| 121 | #ifdef UNICODE_ENABLE | 125 | #ifdef UNICODE_ENABLE |
| 122 | } else if (keycode >= 0x8000000) { | 126 | } else if (keycode >= 0x8000000) { |
| 123 | action_t action; | 127 | action_t action; |
diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h index 100300e81..e93e86483 100644 --- a/quantum/keymap_common.h +++ b/quantum/keymap_common.h | |||
| @@ -177,13 +177,16 @@ extern const uint16_t fn_actions[]; | |||
| 177 | 177 | ||
| 178 | #define MIDI(n) (n | 0x6000) | 178 | #define MIDI(n) (n | 0x6000) |
| 179 | 179 | ||
| 180 | // H-old, T-ap - 256 keycode max | 180 | // M-od, T-ap - 256 keycode max |
| 181 | #define HT(mod, kc) (kc | 0x7000 | ((mod & 0xF) << 8)) | 181 | #define MT(mod, kc) (kc | 0x7000 | ((mod & 0xF) << 8)) |
| 182 | #define CTL_T(kc) HT(0x1, kc) | 182 | #define CTL_T(kc) HT(0x1, kc) |
| 183 | #define SFT_T(kc) HT(0x2, kc) | 183 | #define SFT_T(kc) HT(0x2, kc) |
| 184 | #define ALT_T(kc) HT(0x4, kc) | 184 | #define ALT_T(kc) HT(0x4, kc) |
| 185 | #define GUI_T(kc) HT(0x8, kc) | 185 | #define GUI_T(kc) HT(0x8, kc) |
| 186 | 186 | ||
| 187 | // L-ayer, T-ap - 256 keycode max, 16 layer max | ||
| 188 | #define LT(layer, kc) (kc | 0x7000 | ((layer & 0xF) << 8)) | ||
| 189 | |||
| 187 | // For sending unicode codes. | 190 | // For sending unicode codes. |
| 188 | // You may not send codes over 1FFF -- this supports most of UTF8. | 191 | // You may not send codes over 1FFF -- this supports most of UTF8. |
| 189 | // To have a key that sends out Œ, go UC(0x0152) | 192 | // To have a key that sends out Œ, go UC(0x0152) |
