diff options
author | Damien <[email protected]> | 2016-09-25 14:03:27 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2016-09-25 14:03:27 +0200 |
commit | b75cb53c4a67597dd453fb8bb54af1936b422f6b (patch) | |
tree | 590591f00a3782b43253a1321220c7652cd9799b /tmk_core/common | |
parent | 7a91cce869f7cda8a42bf071ba77ee6096772d20 (diff) | |
parent | 67252625165ffa0a08e723a52562a853aa4b496b (diff) | |
download | qmk_firmware-b75cb53c4a67597dd453fb8bb54af1936b422f6b.tar.gz qmk_firmware-b75cb53c4a67597dd453fb8bb54af1936b422f6b.zip |
Merge pull request #5 from jackhumbert/master
Merge from jackhumbert
Diffstat (limited to 'tmk_core/common')
-rw-r--r-- | tmk_core/common/action.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 08ef22eb97..d485b46c77 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -155,9 +155,10 @@ void process_action(keyrecord_t *record, action_t action) action.key.mods<<4; if (event.pressed) { if (mods) { - if (IS_MOD(action.key.code)) { + if (IS_MOD(action.key.code) || action.key.code == KC_NO) { // e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless. - // this also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT) + // This also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT). + // Same applies for some keys like KC_MEH which are declared as MEH(KC_NO). add_mods(mods); } else { add_weak_mods(mods); @@ -168,7 +169,7 @@ void process_action(keyrecord_t *record, action_t action) } else { unregister_code(action.key.code); if (mods) { - if (IS_MOD(action.key.code)) { + if (IS_MOD(action.key.code) || action.key.code == KC_NO) { del_mods(mods); } else { del_weak_mods(mods); |