mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-13 23:44:54 +00:00
Merge pull request #239 from DidierLoiseau/issue-221
Fix issue #221: LGUI(KC_LSFT) does not work
This commit is contained in:
commit
27ee47d0bd
1 changed files with 12 additions and 2 deletions
|
@ -88,14 +88,24 @@ void process_action(keyrecord_t *record)
|
||||||
action.key.mods<<4;
|
action.key.mods<<4;
|
||||||
if (event.pressed) {
|
if (event.pressed) {
|
||||||
if (mods) {
|
if (mods) {
|
||||||
add_weak_mods(mods);
|
if (IS_MOD(action.key.code)) {
|
||||||
|
// 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)
|
||||||
|
add_mods(mods);
|
||||||
|
} else {
|
||||||
|
add_weak_mods(mods);
|
||||||
|
}
|
||||||
send_keyboard_report();
|
send_keyboard_report();
|
||||||
}
|
}
|
||||||
register_code(action.key.code);
|
register_code(action.key.code);
|
||||||
} else {
|
} else {
|
||||||
unregister_code(action.key.code);
|
unregister_code(action.key.code);
|
||||||
if (mods) {
|
if (mods) {
|
||||||
del_weak_mods(mods);
|
if (IS_MOD(action.key.code)) {
|
||||||
|
del_mods(mods);
|
||||||
|
} else {
|
||||||
|
del_weak_mods(mods);
|
||||||
|
}
|
||||||
send_keyboard_report();
|
send_keyboard_report();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue