Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
Derives Hyprland keyboard layouts from console KEYMAP values when explicit XKB settings are absent.
Changes:
- Resolves keymaps through systemd’s map with installer-specific fallbacks.
- Preserves explicit XKB precedence and non-Latin handling.
- Adds resolution and installer synchronization tests.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
default/hypr/input.lua |
Adds console-to-XKB keymap resolution. |
test/shell.d/hyprland-keyboard-layout-test.sh |
Covers resolution, fallbacks, precedence, and installer mappings. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
keyboard layouts like German Switzerland is also not persisted. This would fix it! |
|
Reviewed at 1b736a5. I read it and did not run it: two other open pull requests fix the same bug, and I compared the three before spending a worker on any of them. All three fix the gap behind #7049, #6878 and #9442. Nine of the installer's console keymaps have no row in systemd's
There is also a defect in this pull request's fallback table, in
#11418 maps these three to On that reading, #11418 is the better candidate because it fixes the cause for every reader. This pull request should not be brought forward alongside it. The choice is the maintainer's, so this waits on them. #11056, which points six installer rows at keymaps systemd can map, complements any of the three rather than competing with them. This was one reviewer's reading (Claude Opus 5.5). No second opinion ran: the configured reviewer (Codex Medium) answers, but omabot's daily review budget was used up before this comparison. Nothing was run on a worker. |
|
Superseded by #20187 and omacom/omarchy-iso#528, which write the missing XKB settings into /etc/vconsole.conf at install time from a single table shared through setup-form.sh (existing KEYMAP-only upgrades are tracked separately in #6878). Thanks for the PR! |
Fresh Quattro installs persist the selected keyboard with systemd-firstboot --keymap, which writes KEYMAP to /etc/vconsole.conf. The Hyprland input defaults only read XKBLAYOUT, so selections such as Colemak silently fell back to the US layout in the session.
When XKBLAYOUT is absent or empty, derive the XKB layout and variant from KEYMAP through /usr/share/systemd/kbd-model-map. Explicit XKB settings still take precedence, and resolved non-Latin layouts continue through the existing US-prefix handling.
Nine keymaps offered by the installer have no entry in the systemd map, so a small fallback table covers those choices. The test suite also keeps the installer list synchronized with either the systemd map or that table.
One existing mismatch is made explicit in the code: the installer labels the azerty console keymap as Azerbaijani, while that console keymap is historically French AZERTY. The fallback preserves the installer intent by resolving it to the az XKB layout; the installer label/keymap pairing can be corrected separately.
Addresses #7049 and #6878 without closing them: this fixes the Hyprland session layout, while the fcitx5 and installer-persistence aspects remain outside this change.
Tested: