diff options
author | dbroqua <dbroqua@mousur.org> | 2017-04-02 23:27:57 +0200 |
---|---|---|
committer | dbroqua <dbroqua@mousur.org> | 2017-04-02 23:27:57 +0200 |
commit | e7347ff0de93ff823462b3ff2b4136b44dc576c0 (patch) | |
tree | 286e2a78fee74eb370641a981d2c81c8e02942b4 /quantum/keymap_common.c | |
parent | 9e72b7e7e97f9ae92c7eb1de66aa03cad047baf6 (diff) | |
parent | 24ec8f509703cbaf9de7b41d251dbb7fcd339559 (diff) |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'quantum/keymap_common.c')
-rw-r--r-- | quantum/keymap_common.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index eced3d2bba..002eabd85e 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -80,7 +80,10 @@ action_t action_for_key(uint8_t layer, keypos_t key) action.code = keymap_function_id_to_action( (int)keycode & 0xFFF ); break; case QK_MACRO ... QK_MACRO_MAX: - action.code = ACTION_MACRO(keycode & 0xFF); + if (keycode & 0x800) // tap macros have upper bit set + action.code = ACTION_MACRO_TAP(keycode & 0xFF); + else + action.code = ACTION_MACRO(keycode & 0xFF); break; case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); @@ -116,8 +119,11 @@ action_t action_for_key(uint8_t layer, keypos_t key) mod = keycode & 0xFF; action.code = ACTION_MODS_ONESHOT(mod); break; + case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX: + action.code = ACTION_LAYER_TAP_TOGGLE(keycode & 0xFF); + break; case QK_MOD_TAP ... QK_MOD_TAP_MAX: - action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); + action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0x1F, keycode & 0xFF); break; #ifdef BACKLIGHT_ENABLE case BL_0 ... BL_15: |