Skip to content

Lead a non-Latin keyboard selection with the chosen US variant - #16868

Open
ThatRetiredDude wants to merge 3 commits into
omacom:quattrofrom
ThatRetiredDude:keyboard-latin-us-variant
Open

ThatRetiredDude wants to merge 3 commits into
omacom:quattrofrom
ThatRetiredDude:keyboard-latin-us-variant

Conversation

@ThatRetiredDude

@ThatRetiredDude ThatRetiredDude commented Oct 28, 2026 •

Copy link
Copy Markdown

Problem

Under Setup > Keyboard > Keyboard Inputs, picking a non-Latin layout first and a US variant alongside it, such as Russian and English (US, Dvorak), writes ~/.config/omarchy/keyboard-layouts as:

XKBLAYOUT=us,ru,us
XKBVARIANT=,,dvorak

keyboard_values in default/input-methods/typing_setup.py keeps the Latin-leading rule by prepending a plain us, but it only drops an existing entry that is exactly us. A us:dvorak or us:colemak choice stays where it was, so the user gets a QWERTY layout they never chose, and the Alt+Alt toggle and the bar's layout indicator cycle through three layouts instead of two.

default/hypr/input.lua already handles a saved list the other way: it moves the existing us entry together with its variant to the front, and skips the two US variants that cannot type Latin letters (rus, chr). The menu's writer and the config's reader disagreed.

Fix

keyboard_values now moves the first chosen US layout, with its variant, to the front of the list, and only adds a plain us when there is no US layout that types Latin letters, matching input.lua. ["ru", "us:dvorak"] becomes us,ru / dvorak,, and a us:rus entry is still left in place behind a new QWERTY (or behind a chosen Latin-capable US variant).

Testing

Added two assertions to test/shell.d/typing-setup-checks.py:

  • ["ru", "us:dvorak"] → ("us,ru", "dvorak,") (fails on quattro with ('us,ru,us', ',,dvorak'))
  • ["ru", "us:rus", "us:dvorak"] → ("us,ru,us", "dvorak,,rus") (checks that us:rus stays put while us:dvorak moves to the front)

Also wired test/shell.d/typing-setup-checks.py into test/shell.d/input-method-test.sh so these assertions execute in ./test/shell and CI after typing-setup-test.sh was removed in #19904.

OMARCHY_PATH=$PWD bash test/shell.d/input-method-test.sh

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Medium impact] The PR appears safe to merge; no actionable new issues were found.

Summary

keyboard_values now moves the first chosen Latin-capable US layout to the front when a non-Latin layout leads. It adds plain US only when no suitable US choice exists.

  • Keyboard setup puts a chosen US variant first with a non-Latin layout.

Reviews (4) · Last reviewed commit: "Run typing-setup-checks.py from input-me..." · Reviewed by Greptile

Comment thread test/shell.d/typing-setup-checks.py Resolved
@ThatRetiredDude

Copy link
Copy Markdown
Author

Agreed, that assertion held on the old code too. Replaced it with the three-way case, ["ru", "us:rus", "us:dvorak"] producing ("us,ru,us", "dvorak,,rus"), which checks both that us:rus stays where it is and that the Dvorak layout moves to the front. It fails on the previous implementation.

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Nov 3, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

I reviewed and verified this, and the fix does what it says. Nothing was pushed to your branch.

Reproduced on an Omarchy worker VM. I ran keyboard_values for each selection, then passed what it writes through the real default/hypr/input.lua to see what Hyprland would be given:

Selection quattro (8d07724) This head (33b5734)
ru, us:dvorak us,ru,us / ,,dvorak us,ru / dvorak,
ru, us:colemak us,ru,us / ,,colemak us,ru / colemak,
ua, us:intl us,ua,us / ,,intl us,ua / intl,
ru, us:chr, us:dvorak us,ru,us,us / ,,chr,dvorak us,ru,us / dvorak,,chr
ru, us:rus us,ru,us / ,,rus same as quattro
ru, us · ru:phonetic · fr, us:intl us,ru / , · us,ru / ,phonetic · fr,us / ,intl same as quattro

input.lua leaves all of these as written, because the list already starts with us. On quattro that means the desktop starts on a QWERTY layout nobody chose and the toggle has three stops. The menu also gives Fcitx keyboard-us rather than the chosen variant, because it takes the first layout. With this head merged onto current quattro and loaded in the worker's live Hyprland session, hyprctl getoption reports us,ru / dvorak, with no config errors.

Tests. The head merges cleanly with current quattro. test/shell.d/typing-setup-test.sh passes on both the head and the merged tree, and the new us:dvorak assertion fails when typing_setup.py is reverted to quattro. ./test/cli passes. The full ./test/shell run has 4 failing files, and the same 4 fail on quattro alone on that worker (ascii, branding-about-animation, first-run, runtime-smoke).

Second opinion: Codex Medium and muse-wonder (pi, thinking high) both reviewed it and found no defect. Their review isn't guaranteed to be independent of mine. Both checked the fix against input.lua case by case: the excluded variants, which US entry moves first, variants staying paired with their layouts, and the fallback when no Latin-capable US entry exists. Both agreed the change is the size the problem needs.

No open issue reports this, so nothing is linked. This now waits on the maintainer.

@ThatRetiredDude
ThatRetiredDude force-pushed the keyboard-latin-us-variant branch from 33b5734 to 7212e39 Compare November 27, 2026 20:47
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review and removed verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Nov 27, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

I rechecked 7212e39 on an Omarchy ISO worker. Selecting Russian and US Dvorak now leaves just those two layouts checked, with Dvorak first in Hyprland and Fcitx. All 49 input-method and typing checks passed, and the Dvorak assertion failed when I reverted the fix.

Codex GPT-6.2 Sol at high effort reviewed the change. Opus 5.5 at high effort and muse-wonder via pi at high effort also found no code defect. The reviewers could see the driver’s notes.

The CLI suite passed. The full shell suite hit four failures outside the input-method checks. The audio panel, installer logo, and runtime smoke assertions also failed on quattro. The agent-account test stalled at an interactive Codex login on the PR worker and timed out at the same point on quattro. The GitHub Actions test run is awaiting maintainer approval. Tests run

Before, plain US is checked alongside Russian and Dvorak

After, Dvorak and Russian are the only checked layouts

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Nov 29, 2026
Picking Russian and English (US, Dvorak) under Setup > Typing wrote
us,ru,us with a plain QWERTY the user never chose, so the layout toggle
cycled through three layouts. keyboard_values now moves the chosen US
layout and its variant to the front, as input.lua does for a saved
list, and only adds a QWERTY when no Latin-typing US layout is there.
A Russian phonetic US variant chosen ahead of Dvorak must stay where it
is while the Dvorak one moves to the front; the previous assertion held
on the old code too.
Commit 0fae8e6 (omacom#19904) removed test/shell.d/typing-setup-test.sh while leaving typing-setup-checks.py in place. Run it alongside input-method-checks.py so the keyboard_values regression tests execute in ./test/shell and CI.
@ThatRetiredDude
ThatRetiredDude force-pushed the keyboard-latin-us-variant branch from 7212e39 to b44a708 Compare December 2, 2026 13:09
@omarchybot

Copy link
Copy Markdown
Collaborator

Recommend: Hold — a maintainer needs to approve the Tests run on b44a708.

Codex GPT-6.2 Sol (high), Opus 5.5 (high), and muse-wonder (high) reviewed the keyboard selection path and confirmed that CI picks up the restored typing checks. We found no code defect. The reviewers agreed, with no guarantee of independence. Worker verification remains pending for this revision. Tests run

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