View Issue Details

IDProjectCategoryView StatusLast Update
0000004Kohi EngineEnhancementspublic2026-11-11 16:37
Reportertravisvroman Assigned Totravisvroman  
PrioritylowSeverityfeatureReproducibilityN/A
Status closedResolutionno change required 
PlatformLinux DesktopOSGNU/LinuxOS VersionN/A
Summary0000004: Linux Platform keyboard input fixes
Description

Ported over from GitHub issues: https://github.com/travisvroman/kohi/issues/53

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.

Tagsenhancement, Linux
Revision

Activities

travisvroman

2026-11-11 16:37

administrator   ~0000013

All of this was fixed at some point in the past. The only thing that wasn't done was the static lookup of table codes, because IMO a switch is cleaner than pulling in an entire lookup table every time.

Issue History

Date Modified Username Field Change
2026-10-19 17:37 travisvroman New Issue
2026-10-19 17:37 travisvroman Status new => assigned
2026-10-19 17:37 travisvroman Assigned To => travisvroman
2026-10-19 17:37 travisvroman Tag Attached: enhancement
2026-10-19 17:37 travisvroman Tag Attached: Linux
2026-11-11 16:37 travisvroman Status assigned => closed
2026-11-11 16:37 travisvroman Resolution open => no change required
2026-11-11 16:37 travisvroman Note Added: 0000013