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

PREVENT_STUCK_MODIFIERS should be the default #2518

Closed Talljoe closed 5 years ago

Talljoe commented 6 years ago

I'm happy to do this work; want to get feedback first.

Many problems new users face with the layer system is realizing the keydown and keyup can occur on different layers. This confusion leads to frustration, long debug sessions, and ultimately questions on the boards. Some features (notably stenography) have issues if the wrong keyup happens. It only the rare and advanced scenario when someone wants the keyup to be different that the keydown therefore we should make the default to send the reciprocal keyup event to every keydown event.

I propose to invert the logic, create an ALLOW_STUCK_MODIFIERS define and back-port it to all existing keymaps that don't have PREVENT_STUCK_MODIFIERS. I'm welcome to changing the name of ALLOW_STUCK_MODIFIERS to something less passive-aggressive. ;)

micke commented 6 years ago

So much yes on this. I use PSM and Then i delete this line https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.c#L121. To make it possible to change layers without keys being released which is a big pita when gaming and switching layers.

Thank you for your work on the pr @Talljoe

pepijndevos commented 6 years ago

Until this is implemented, I think it would be good to mention in the docs that putting modifiers on a layer can cause you trouble.

vomindoraan commented 5 years ago

Can we close this issue now?

drashna commented 5 years ago

Yup. :)

Didn't get to this yet.