Skip to content

Start the installer's keyboard in US for non-Latin layouts - #20481

Closed
emirb wants to merge 2 commits into
v4-6-0from
rc2/kmscon-us-first
Closed

emirb wants to merge 2 commits into
v4-6-0from
rc2/kmscon-us-first

Conversation

@emirb

@emirb emirb commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

What changes

Since the installer moved into kmscon (omarchy-iso#500), omarchy_keymap_xkb takes systemd's kbd-model-map row as it is. For Russian that is ru,us, so the installer types Cyrillic first. 4.5's loadkeys ru typed Latin first.

The LUKS prompt keeps layouts in omarchy_hooks.conf's US-prompt list (non-Latin layouts and all rs variants) out of the initramfs and types US. A passphrase typed in a different layout during install can't be typed at boot, locking out fresh encrypted installs.

This puts US first in kmscon whenever the first layout is in omarchy_hooks.conf's list — including Serbian Latin (sr-latin -> us,rs ,latin), matching omarchy_hooks.conf, omarchy_vconsole.conf, and quattro (#20404). The user's layout stays one Shift+Shift away, and variants stay with their layouts. Where the row has no group toggle, Shift+Shift is added: Hebrew had no Latin layout in kmscon at all, and Georgian had no toggle.

Landing note: ship this in the same v4-6-0 ISO build as omacom/omarchy-iso#622 (which drops the rs(latin) exemption in uki_vconsole.py) so kmscon, the pre-built UKI, and rebuilt initramfs images all start in US for sr-latin.

The layout code comes from outfoxxed's boot-splash work (7f7dd2a on boot-splash), taken on its own for v4-6-0.

Not covered: a user can still switch to the non-Latin layout on purpose and type a passphrase the US prompt can't type. The form doesn't know yet whether the disk will be encrypted, so a guard for that is a separate change.

Verification

test/shell.d/provision-owner-keyboard-test.sh, kmscon block, run in an Arch container against the real /usr/share/systemd/kbd-model-map:

  • Before: fails, ua gives ua,us, bg-cp1251 gives bg,us, and sr-latin gives rs pc105 latin.
  • After: passes. ru gives us,ru pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll, il gives us,il …,grp:shifts_toggle, sr-latin gives us,rs pc105 ,latin terminate:ctrl_alt_bksp,grp:shifts_toggle, and de-latin1 and us are unchanged.

Verified end to end in QEMU 11.1 (OVMF, 4 GiB, 4.6.0-rc1 ISO, Russian encrypted install unlocking through Limine/Plymouth on first try) and on bare-metal hardware (ASUS Zenbook 14 UX3480QA via USB HID keycodes):

  • Stock v4-6-0 with Russian (ru): ber typed иук.
  • With this change + Russian (ru): ber found Europe/Berlin, emir typed emir, and Shift+Shift toggled to Cyrillic (ru -> кг).
  • With the earlier rs(latin) exemption + Serbian (sr-latin): zur typed yur, omarchyz/1 enrolled omarchzy-1 in LUKS, and cryptsetup --test-passphrase rejected omarchyz/1 (rc=2) against the US-first unlock prompt.
  • With this change + Serbian (sr-latin): zur found Europe/Zurich, omarchyz/1 typed omarchyz/1, and Shift+Shift toggled to Serbian Latin (z/y -> y-z).

Screenshots

Before, stock rc1 with Russian: the timezone filter and the username type Cyrillic.

Stock rc1 with Russian: ber types иук, emir types уьшк

After: the same keys type Latin, and the Russian layout is one Shift+Shift away.

With this change: ber finds Europe/Berlin and emir types emir

After: the disk unlocked at the Plymouth prompt with the same keys, and the desktop came up.

Desktop after unlocking with the passphrase typed in the installer

Since the installer runs in kmscon, omarchy_keymap_xkb takes systemd's
kbd-model-map row as it is. For Russian that is ru,us, so kmscon types
Cyrillic first. 4.5's loadkeys ru typed Latin first.

The LUKS prompt keeps a non-Latin layout out of the initramfs and types
US, so a passphrase typed as kmscon starts can't be typed at boot. On an
encrypted 4.6.0-rc1 install with Russian, the keys omarchyz/1 enrolled
the 18-byte Cyrillic passphrase, and the prompt rejected it.

A non-Latin first layout now goes after US, with the variants kept in
place and Shift+Shift added where the row has no group toggle. Hebrew
had no Latin layout in kmscon at all, and Georgian had no toggle.
Serbian Latin keeps rs(latin), which the ISO's prebuilt UKI uses at the
unlock prompt.

The layout code comes from outfoxxed's boot-splash work (7f7dd2a on
boot-splash), taken on its own so it can ship before the splash.

Co-authored-by: outfoxxed <outfoxxed@outfoxxed.me>
(cherry picked from commit f5a58a7)
@emirb emirb added this to the 4.6.0 milestone Nov 27, 2026
@greptile-apps

greptile-apps Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge with the coordinated ISO release described by emirb.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge with the coordinated ISO release described by emirb.

Summary

Starts kmscon in US for layouts on the US-prompt list, including Serbian Latin, while keeping the selected layout available through a keyboard toggle.

  • Listed non-Latin layouts now start in US during setup.

Reviews (3) · Last reviewed commit: "Start Serbian Latin in US in kmscon to m..." · Reviewed by Greptile

@omarchybot omarchybot added the bug Something isn't working label Nov 27, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Codex GPT-6.2 Sol High and Opus 5.5 High reviewed the kmscon and unlock code and agreed that starting in US addresses the default Russian layout mismatch. The model reviews may share context. Serbian Latin still starts in US after an initramfs rebuild, including the rebuild during first-boot owner setup, while the installer and prebuilt UKI use Serbian Latin. GitHub CI passed. Worker reproduction is pending because the release branches lack the protection required by triage.

@omarchybot

Copy link
Copy Markdown
Collaborator

Codex GPT-6.2 Sol High, Opus 5.5 High and muse-wonder via pi, thinking high checked the revised keyboard mapping against the installer, first-boot setup and initramfs code. We found no further code defect. The reviews may share context. The new revision starts Serbian Latin in US, matching rebuilt boot images. The 4.6.0 ISO needs this version of kmscon.sh and omacom/omarchy-iso#622 in the same build so the prebuilt boot image also starts in US.

GitHub CI passed on 3c69b1d. Worker reproduction is pending because the v4-6-0 branch lacks the required PR ruleset.

@emirb

emirb commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

Closing: 4.6.0-rc2 will be tagged from quattro, where Serbian Latin (sr-latin) will be kept native QWERTZ alongside omarchy-splash's visible layout switcher.

@emirb emirb closed this Nov 29, 2026
@emirb emirb removed this from the 4.6.0 milestone Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants