aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/common/action.c
diff options
context:
space:
mode:
authorErez Zukerman <ezuk@madmimi.com>2016-09-23 20:57:41 -0400
committerErez Zukerman <ezuk@madmimi.com>2016-09-23 20:57:41 -0400
commit67252625165ffa0a08e723a52562a853aa4b496b (patch)
tree590591f00a3782b43253a1321220c7652cd9799b /tmk_core/common/action.c
parent1a96b2cdc8895bd9f219e6c793aeee6ff7ce81f6 (diff)
parente1fa9073c263d260fc0ec3c0d2d8a6a6f5aee42e (diff)
downloadqmk_firmware-67252625165ffa0a08e723a52562a853aa4b496b.tar.gz
qmk_firmware-67252625165ffa0a08e723a52562a853aa4b496b.zip
Merge branch 'master' of github.com:jackhumbert/qmk_firmware
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 08ef22eb9..d485b46c7 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)
155 action.key.mods<<4; 155 action.key.mods<<4;
156 if (event.pressed) { 156 if (event.pressed) {
157 if (mods) { 157 if (mods) {
158 if (IS_MOD(action.key.code)) { 158 if (IS_MOD(action.key.code) || action.key.code == KC_NO) {
159 // e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless. 159 // e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless.
160 // this also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT) 160 // This also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT).
161 // Same applies for some keys like KC_MEH which are declared as MEH(KC_NO).
161 add_mods(mods); 162 add_mods(mods);
162 } else { 163 } else {
163 add_weak_mods(mods); 164 add_weak_mods(mods);
@@ -168,7 +169,7 @@ void process_action(keyrecord_t *record, action_t action)
168 } else { 169 } else {
169 unregister_code(action.key.code); 170 unregister_code(action.key.code);
170 if (mods) { 171 if (mods) {
171 if (IS_MOD(action.key.code)) { 172 if (IS_MOD(action.key.code) || action.key.code == KC_NO) {
172 del_mods(mods); 173 del_mods(mods);
173 } else { 174 } else {
174 del_weak_mods(mods); 175 del_weak_mods(mods);