summaryrefslogtreecommitdiff
path: root/tmk_core/common/action.c
diff options
context:
space:
mode:
authorxyverz <xyverz@gmail.com>2016-09-30 23:16:50 -0700
committerxyverz <xyverz@gmail.com>2016-09-30 23:16:50 -0700
commite69e4c1ef2cd553597e10d1ae5b0384d29f2c16f (patch)
tree957641d33f60e75b8fd747da11ed3bca06f0cfab /tmk_core/common/action.c
parente3c3170610561042df3d67f358c15553878a2012 (diff)
parent35e6870e5c8943c044187256e01c96ef400ca067 (diff)
Merge remote-tracking branch 'jackhumbert/master'
Diffstat (limited to 'tmk_core/common/action.c')
-rw-r--r--tmk_core/common/action.c7
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);