forked from mirrors/qmk_userspace
Fix #156: clear weak mods on every key press
- new macro_mods bit field for mods applied by macros - weak_mods now only used for ACT_{L,R}MODS (i.e. LSFT, RSFT, LCTL etc.) - clear the _weak_ mods on every key *pressed* such that LSFT etc. can no more interfere with the next key
This commit is contained in:
parent
7d3ebd7b40
commit
b7a81f0419
4 changed files with 23 additions and 2 deletions
|
@ -41,7 +41,7 @@ void action_macro_play(const macro_t *macro_p)
|
|||
MACRO_READ();
|
||||
dprintf("KEY_DOWN(%02X)\n", macro);
|
||||
if (IS_MOD(macro)) {
|
||||
add_weak_mods(MOD_BIT(macro));
|
||||
add_macro_mods(MOD_BIT(macro));
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
register_code(macro);
|
||||
|
@ -51,7 +51,7 @@ void action_macro_play(const macro_t *macro_p)
|
|||
MACRO_READ();
|
||||
dprintf("KEY_UP(%02X)\n", macro);
|
||||
if (IS_MOD(macro)) {
|
||||
del_weak_mods(MOD_BIT(macro));
|
||||
del_macro_mods(MOD_BIT(macro));
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
unregister_code(macro);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue