Skip to content

Fix/linux nonlatin keyboard layout#17514

Open
TheCyberAngel wants to merge 3 commits into
FakeFishGames:masterfrom
TheCyberAngel:fix/linux-nonlatin-keyboard-layout
Open

Fix/linux nonlatin keyboard layout#17514
TheCyberAngel wants to merge 3 commits into
FakeFishGames:masterfrom
TheCyberAngel:fix/linux-nonlatin-keyboard-layout

Conversation

@TheCyberAngel

@TheCyberAngel TheCyberAngel commented May 18, 2026

Copy link
Copy Markdown

This fixes keyboard bindings on Linux when using non-Latin keyboard layouts such as Ukrainian or Russian.

Previously SDL key events were mapped through layout-dependent keycodes. On non-Latin layouts, keys like WASD could resolve to unmapped Unicode keycodes and become Keys.None, causing movement and default keybindings to break.

The fix adds a scancode-based fallback:

  • KeyDown/KeyUp now fall back to physical SDL scancodes if keycode mapping fails
  • QwertyToCurrentLayout also falls back to scancodes, preventing reset-to-default bindings from becoming Keys.None

Text input remains layout-aware, so chat and text fields still support non-English input correctly.

Tested on Linux with Ukrainian and Russian keyboard layout:

  • gameplay movement works
  • rebinding keys works
  • resetting controls no longer produces Keys.None
  • chat input still supports Kyrylic text

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