Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux Platform keyboard input fixes #53

Open
travisvroman opened this issue May 10, 2022 · 0 comments
Open

Linux Platform keyboard input fixes #53

travisvroman opened this issue May 10, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request Linux Affects Linux Operating System

Comments

@travisvroman
Copy link
Owner

travisvroman commented May 10, 2022

Per a comment on YT from April E, can eliminate the need to globally turn off key repeats by doing the following:

  • Solve the key repeating problem without needing to change it globally on the server by using the xkb extension to set the XCB_XKB_PER_CLIENT_FLAG_DETECTABLE_AUTO_REPEAT flag on.

Also from April E:

"I found the reason for the & ~0x80 being done on X11 events. Every event has an 8bit code. And the most significant bit in the code is set if the event was generated from a SendEvent request (like from a window manager vs the X server itself.) & ~0x80 = 0111 1111 so by anding it to the event you are clearing that top bit ensuring that you will always match your event code regardless of the event's origin. Arguably just anding by 0x7F would be better. Anyway...that's the reason behind it. So in your cases where you check for the pressed state you should do the same. You also want to free the replies you get when retrieving the WM_PROTOCOLS & WM_DELETE_WINDOW atoms."

Finally, add a static lookup table of key codes->keys and eliminate switch in translate function.

@travisvroman travisvroman added enhancement New feature or request Linux Affects Linux Operating System labels May 10, 2022
@travisvroman travisvroman self-assigned this May 10, 2022
S-Marais added a commit to S-Marais/kohi that referenced this issue Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Linux Affects Linux Operating System
Projects
None yet
Development

No branches or pull requests

1 participant