qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.02k stars 38.73k forks source link

[Bug] When holding multiple mod-tap keys, only one gets registered as a modifier #13346

Open jasonccox opened 3 years ago

jasonccox commented 3 years ago

Describe the Bug

I have home-row modifiers set up with mod-tap like so:

#define HM_A LALT_T(KC_A)
#define HM_R LGUI_T(KC_R)
#define HM_S LSFT_T(KC_S)
#define HM_T LCTL_T(KC_T)

My relevant configuration is as follows:

#define TAPPING_TERM 250
#define IGNORE_MOD_TAP_INTERRUPT
#define TAPPING_FORCE_HOLD
#define PERMISSIVE_HOLD

When I input this key sequence:

HM_R down, HM_S down, KC_SPACE down, KC_SPACE up, HM_S up, HM_R up

My computer sees the following:

gui down, s down, space down, space up, s up, gui up

But I would expect to see this:

gui down, shift down, space down, space up, shift up, gui up

Basically, I would expect the second mod-tap key to also be treated as a modifier since space was pressed and released between when it was pressed and released.

System Information

precondition commented 2 years ago

Can you reproduce that error when mapping HM_S on another switch?

jasonccox commented 2 years ago

Yes, it does the same thing with my home row mods on the other side of the keyboard.

I should add that this only occurs if all the key presses/releases happen before the tapping term. It's much easier to reproduce with the tapping term set to something like 1000.