Use the configured keyboard layout for the on-screen keyboard - #791
Open
Gjuju wants to merge 2 commits into
Open
Use the configured keyboard layout for the on-screen keyboard#791Gjuju wants to merge 2 commits into
Gjuju wants to merge 2 commits into
Conversation
Gjuju
force-pushed
the
contrib/osk-keyboard-layout
branch
from
September 8, 2026 07:49
7ff3baf to
728f5a4
Compare
The popup keyboard's Latin layer is hardcoded to QWERTY, so on a panel used with an AZERTY or QWERTZ keyboard the letters do not match the keys the user knows, and every word has to be hunted for. Pick the key positions from the XKB layout code already set in Configure > System > Keyboard layout: initializeOSK() now takes it and swaps the Latin table for AZERTY or QWERTZ when the code calls for it. The code lists were taken from the X11 keyboard database, and cover every Latin layout offered by the Keyboard layout selector: 5 AZERTY (be cd fr ml sn), 11 QWERTZ (al at ba ch cz de hr hu me si sk) and 37 that stay on QWERTY. Everything else is untouched - the accented and Cyrillic layers, the layer cycle key, the numeric mode and the CSS - as both tables fit the existing 4x11 grid. Letters that do not fit, such as the German eszett, are already on the accented layer. Unknown or unset codes keep QWERTY, so nothing changes for existing users. The layout code is a session-only var, so it is added to the cfg tables the WebUI reads. Adding another variant later is one table plus one code list.
Gjuju
force-pushed
the
contrib/osk-keyboard-layout
branch
from
September 9, 2026 17:45
728f5a4 to
7963b10
Compare
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.
The on-screen keyboard's Latin layer is hardcoded to QWERTY, so on a panel used with an
AZERTY or QWERTZ keyboard the letters aren't where the user expects them.
initializeOSK()now reads the XKB layout code already set in Configure > System >Keyboard layout and swaps the Latin table when the code calls for it — no new setting.
The code lists come from the X11 keyboard database and cover every Latin layout the
selector offers: AZERTY for
be cd fr ml sn, QWERTZ foral at ba ch cz de hr hu me si sk, QWERTY for the other 37.Untouched: the accented and Cyrillic layers, the layer cycle key, the numeric mode and
osk.css— both tables fit the existing 4x11 grid, and letters that don't fit (the Germaneszett, say) are already on the accented layer.
keyboardis a session-only var, so oneline in
addExtraSessionVars()exposes it to the WebUI.Tested on a touch panel with
XKBLAYOUT="fr". An unknown or unset code keeps QWERTY, sonothing changes for existing users; adding another variant later is one table plus one
code list.
Commits