Skip to content

fix(connect): bind primary XKB group instead of disabling X11 capture - #108

Merged
steipete merged 1 commit into
mainfrom
claude/connect-x11-groups
Jul 18, 2026
Merged

fix(connect): bind primary XKB group instead of disabling X11 capture#108
steipete merged 1 commit into
mainfrom
claude/connect-x11-groups

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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.

@steipete
steipete merged commit 753d923 into main Jul 18, 2026
2 checks passed
@steipete
steipete deleted the claude/connect-x11-groups branch July 18, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant