Skip to content

fix: Match group keys by scancode as well as keysym (#360)#373

Open
andy5995 wants to merge 2 commits intodevelopfrom
fix/group-key-arm
Open

fix: Match group keys by scancode as well as keysym (#360)#373
andy5995 wants to merge 2 commits intodevelopfrom
fix/group-key-arm

Conversation

@andy5995
Copy link
Copy Markdown
Collaborator

On ARM Linux (Raspberry Pi 5) SDL2 uses the Wayland backend with libxkbcommon, which can transform keysym.sym for modifier+key combinations so that Ctrl+1 no longer matches SDLK_1. Scancodes represent the physical key position and are unaffected by modifier state or backend differences.

Add a scancode fallback: convert the configured SDL_Keycode to its corresponding SDL_Scancode via SDL_GetScancodeFromKey() and accept a match on either sym or scancode, so Ctrl+Num group keys work on all platforms.

Fixes #360

andy5995 and others added 2 commits March 21, 2026 01:52
On ARM Linux (Raspberry Pi 5) SDL2 uses the Wayland backend with
libxkbcommon, which can transform keysym.sym for modifier+key
combinations so that Ctrl+1 no longer matches SDLK_1. Scancodes
represent the physical key position and are unaffected by modifier
state or backend differences.

Add a scancode fallback: convert the configured SDL_Keycode to its
corresponding SDL_Scancode via SDL_GetScancodeFromKey() and accept a
match on either sym or scancode, so Ctrl+Num group keys work on all
platforms.

Fixes #360

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

Can't use GroupUnitsKey on linux-arm64 platform (raspi-5)

1 participant