-
-
Notifications
You must be signed in to change notification settings - Fork 804
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x11: fix handling of high-speed key events
test scenario is: ``` bash -c "sleep 5; for((i=0;i<30;i++)); do xdotool keydown --delay 0 Shift_L keydown --delay 0 9 keyup --delay 0 Shift_L keyup --delay 0 9; done" ``` That should cause a series of `(` characters to be emitted, but prior to this commit is was usually mostly `9`'s. What's changing here is: * We copy the pertinent fields from the last xcb StateNotify event. That ostensibly has the current modifier and layout state, but because it comes from the X server, it doesn't factor in knowledge from the IME. * When processing an XCB key event, compute the current modifier mask and override the XKB state with it. * Now XKB will produce correct information about the key syms * Restore the modifier state from the saved StateNotify information. refs: #4151 refs: #4615 refs: fcitx/fcitx5#893 refs: ibus/ibus#2600 refs: #3840
- Loading branch information
Showing
2 changed files
with
107 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters