Closed unclechu closed 5 years ago
I did some investigation, and it looks like releasing of additional control for some reason doesn't match any condition in key handling flow and does down to otherwise
section which is just triggered alone key (which in case of Caps Lock
is Escape
key), and only after you press and release Caps Lock
it somehow remembers it was interpreted as LCtrl
earlier and triggers release of LCtrl
.
Here is piece of --verbose
log for both reproduce ways:
With held Alt
key (I pressed LShift
twice after releasing everything on purpose, to leave a mark in log):
...
CapsLockKey pressed with combo, triggering ControlLeftKey (X key code: 37)...
Triggering pressing of alternative ArrowDownKey (X key code: 116) by KKey...
KKey is released
Triggering releasing of alternative ArrowDownKey (X key code: 116) by KKey...
AltLeftKey is released
AltLeftKey is released but some alternative keys are still pressed, will turn alternative mode off after all those keys being released.
CapsLockKey is released
All alternative keys have been released after delayed turning alternative mode off, now turning alternative mode off...
Triggering releasing of CapsLockKey as EscapeKey (X key code: 9)...
Setting xmobar Alternative Mode indicator state Off...
ShiftLeftKey is pressed
Triggering pressing of ShiftLeftKey (X key code: 50)...
ShiftLeftKey is released
Triggering releasing of ShiftLeftKey (X key code: 50)...
ShiftLeftKey is pressed
Triggering pressing of ShiftLeftKey (X key code: 50)...
ShiftLeftKey is released
Triggering releasing of ShiftLeftKey (X key code: 50)...
CapsLockKey is pressed
CapsLockKey is released
CapsLockKey released after pressed with combos, it means it was interpreted as ControlLeftKey
Triggering releasing of ControlLeftKey (X key code: 37)...
...
It also strange (but not part of the issue since it doesn't happening with double pressing of Super
key but issue is reproduced the same way) that it says "some alternative keys are still pressed" while only Caps Lock
is pressed.
With double pressing of Super
key:
...
Triggering pressing of alternative ArrowDownKey (X key code: 116) by KKey...
KKey is released
Triggering releasing of alternative ArrowDownKey (X key code: 116) by KKey...
CapsLockKey is pressed
CapsLockKey was pressed with some another keys that hadn't be released in time, these another keys WONT be taken as combo with additional control
Storing keys was pressed before CapsLockKey: [SuperLeftKey]...
KKey is pressed
CapsLockKey pressed with combo, triggering ControlLeftKey (X key code: 37)...
Triggering pressing of alternative ArrowDownKey (X key code: 116) by KKey...
KKey is released
Triggering releasing of alternative ArrowDownKey (X key code: 116) by KKey...
SuperLeftKey is released
SuperLeftKey released after some alternative keys had triggered in context of double press of Super key feature, triggering off events for unreleased keys: [CapsLockKey], turning alternative mode off and resetting state of this feature...
Triggering releasing of CapsLockKey (as EscapeKey) (X key code: 9)...
Setting xmobar Alternative Mode indicator state Off...
CapsLockKey is released
ShiftLeftKey is pressed
Triggering pressing of ShiftLeftKey (X key code: 50)...
ShiftLeftKey is released
Triggering releasing of ShiftLeftKey (X key code: 50)...
ShiftLeftKey is pressed
Triggering pressing of ShiftLeftKey (X key code: 50)...
ShiftLeftKey is released
Triggering releasing of ShiftLeftKey (X key code: 50)...
CapsLockKey is pressed
CapsLockKey is released
CapsLockKey released after pressed with combos, it means it was interpreted as ControlLeftKey
Triggering releasing of ControlLeftKey (X key code: 37)...
...
Fixed that "some alternative keys are still pressed" unrelated issue by 0348b78175f5d72f7366130ffd162f4c7dd3a00a and it accidentally fixed this issue for held Alt
for alternative mode (but not for double pressing Super
key).
Fixed by 65487cced7469ef5fe752f65a01701fcf4ef4d51
I found I way to reproduce it (just release
Alt
key beforeCapsLock
/Enter
).It seems it's can be reproduced only after alternative mode is turned on and additional control (
Caps Lock
/Enter
key) was pressed with some another key. Here's two ways to reproduce it:Alt
(alternative mode will be turned on);Caps Lock
;J
for example),Caps Lock
interpreted asLCtrl
key now;Alt
(alternative mode won't be turned off, until you releaseCaps Lock
);Caps Lock
;LCtrl
isn't triggered,LCtrl
kept pressed for the system (just pressing and releasing ofCaps Lock
fixes it).Super
key;J
for example), alternative mode will be turned on;Caps Lock
;J
for example), if you skip this step, the bug won't reproduce,Caps Lock
now interpreted asLCtrl
;Super
(alternative mode will be turned off);Caps Lock
;LCtrl
isn't triggered,LCtrl
kept pressed for the system (just pressing and releasing ofCaps Lock
fixes it).It doesn't matter which (left or right)
Alt
key orSuper
key you use, and it doesn't matter which additional control you use (Caps Lock
orEnter
), it will reproduce in all cases.