Skip to content

x11: Fix input on systems where keyboard layout group 0 is not the active one. - #330

Open
vadim-pavlov wants to merge 1 commit into
rvaiya:masterfrom
vadim-pavlov:x11-multi-kb-layout-fix-1
Open

x11: Fix input on systems where keyboard layout group 0 is not the active one.#330
vadim-pavlov wants to merge 1 commit into
rvaiya:masterfrom
vadim-pavlov:x11-multi-kb-layout-fix-1

Conversation

@vadim-pavlov

Copy link
Copy Markdown

This pull request aims to help people with multiple keyboard layouts on x11 systems.

Issue

XKeycodeToKeysym only returns the KeySym from the first key group. As a result, when a user switches between multiple keyboard layouts, the returned KeySym always corresponds to the first layout, even if a different layout is currently active.

Solution

  • Replaced XKeycodeToKeysym with XkbKeycodeToKeysym to ensure the active key group (current keyboard layout) is respected.
  • Used XConvertCase as a layout-agnostic way to determine the Shift state for a given key name.

Resolves #230

Switch key lookup to XkbKeycodeToKeysym and track the current XKB group.
@vadim-pavlov vadim-pavlov changed the title x11: Fix input on systems where keyboard layout group 0 is not English. x11: Fix input on systems where keyboard layout group 0 is not the active one. Jan 11, 2026
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.

It seems that hint/hint2 mode isn't respecting the system keyboard layout...

1 participant