fix(connect): bind primary XKB group instead of disabling X11 capture - #108
Merged
Conversation
… on multi-group keyboards
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by real-hardware validation on a Crabbox Linux box (Xvfb X server). The Connect Linux X11 backend called
buildX11Keymap, which errored whenever a keycode's keysyms differed across XKB groups (any keyboard with a secondary layout — extremely common, including default Xvfb). That error disabled the entire backend, silently falling back to the synthetic test pattern — so real screen capture never ran on a normal Linux desktop.Fix: on multi-group keycodes, bind only the primary group's base+shift levels instead of aborting. Standard typing and, critically, screen capture + input injection keep working. Active-group-aware XKB mapping is a documented follow-up.
Validation (real hardware, Crabbox aws cbx_5cd10de9bde9)
Before:
Backend: synthetic test pattern, SERVER_INIT 640x360 (fake), pointer move ignored.After:
Backend: Linux X11 (MIT-SHM capture + XTest input), SERVER_INIT 1920x1080 (real display), Tight framebuffer enc=7, and a client PointerEvent to (321,210) actually moved the X cursor (xdotool confirmed x:321 y:210). Auth accept=0 / wrong-password reject=1; Security None absent.go build/go vet/go test ./...pass; updated the two keymap tests to assert graceful primary-group degradation.