diff options
author | cbbrowne <cbbrowne@cbbrowne.tor.int-afilias.info> | 2016-09-23 17:51:32 -0400 |
---|---|---|
committer | cbbrowne <cbbrowne@cbbrowne.tor.int-afilias.info> | 2016-09-23 17:51:32 -0400 |
commit | 3f020c0b928a1f4999a01c06105380faf10dcf73 (patch) | |
tree | 6d15fbb06e86040d6739bbbd805ac5ebee77e9b9 /tmk_core/common/action.c | |
parent | 888bd89ba7f895327162c4ff34655bf21590821e (diff) | |
parent | e1fa9073c263d260fc0ec3c0d2d8a6a6f5aee42e (diff) |
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
Diffstat (limited to 'tmk_core/common/action.c')
-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); |