diff options
author | Luke Silva <lukemasilva@gmail.com> | 2017-01-27 10:28:42 +1100 |
---|---|---|
committer | Luke Silva <lukemasilva@gmail.com> | 2017-01-27 10:28:42 +1100 |
commit | cfc4149712217625fcb75e50348094fd9df432f5 (patch) | |
tree | d1041e50f5c4e5dc643f6fb867ce327486b94a7c /quantum/keymap_common.c | |
parent | 87bc36253dd915c51571e1972b771f49db9673d3 (diff) | |
download | firmware-cfc4149712217625fcb75e50348094fd9df432f5.tar.gz firmware-cfc4149712217625fcb75e50348094fd9df432f5.tar.bz2 firmware-cfc4149712217625fcb75e50348094fd9df432f5.zip |
Add ability to use tap macros without using functions
Diffstat (limited to 'quantum/keymap_common.c')
-rw-r--r-- | quantum/keymap_common.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index eced3d2bb..5190f24e8 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); |