]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Fix issue #772 Meh and Hyper not working
authorDidier Loiseau <didierloiseau+git@gmail.com>
Thu, 22 Sep 2016 22:55:15 +0000 (00:55 +0200)
committerDidier Loiseau <didierloiseau+git@gmail.com>
Thu, 22 Sep 2016 23:20:49 +0000 (01:20 +0200)
tmk_core/common/action.c

index 08ef22eb970bc28f08244cb041b359063581cb19..d485b46c77cf83f81967d9af2060cd0f42fd3a66 100644 (file)
@@ -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);