diff options
author | Jack Humbert <jack.humb@gmail.com> | 2017-02-07 13:18:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-07 13:18:47 -0500 |
commit | 3c7fa0acc10305a573bc3bb29243a7a3d601579b (patch) | |
tree | 49aa463e861b30c3fa0bd454679e1aefebcb7c9c /quantum/keymap_common.c | |
parent | 0c2b6951a6ad80649798c0eca36a9999ebae0b13 (diff) | |
parent | 77e54e34e129a03e58c128171a7188978ec908b4 (diff) | |
download | qmk_firmware-3c7fa0acc10305a573bc3bb29243a7a3d601579b.tar.gz |
Merge pull request #1046 from LukeSilva/master
Add Tapping Macros to QMK
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); |