omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Input indicator shows "KO" for Latin input on Korean installs, which reads as Hangul being on

Open AI-Dico opened this issue 1 month ago • 2 comments

System details

Apple Silicon Mac (M5 Max), Try Omarchy v1.1.0, Omarchy 4.0.0.r7105.g8e5bdd0 (edge), first boot with the Korean keyboard choice

What's wrong?

On a Korean install the bar's input indicator shows KO while typing Latin letters and 한 while typing Hangul. Both read as "Korean", so it is hard to tell at a glance which mode is active.

Steps to reproduce

  1. Install (or first-boot) with the Korean keyboard choice (Korean|us|hangul|kr:kr104).
  2. The Fcitx group is keyboard-kr-kr104 + hangul; the desktop layout is kr(kr104).
  3. Look at the input indicator in the bar, then press 한/영 or Super + I.

Actual: direct input shows KO, Hangul shows 한.

Expected: direct input shows a Latin label (EN, as on a us + Pinyin or us + Mozc group), Hangul shows 한.

Cause: for a keyboard-* method inputLabel in shell/plugins/bar/widgets/KeyboardLayoutModel.js falls back to the compositor layout label, which is the xkb language brief of "Korean (101/104-key compatible)", i.e. KO. The same happens for Japanese on a JIS keyboard (keyboard-jp + Mozc shows JA next to あ). Groups whose Latin layout is us (Chinese, Taiwan, Hong Kong, Japanese with a US keyboard) already show EN and are not affected.

Possible approaches

  1. In inputLabel, when the group has a composition engine and the active compositor layout is a Korean or Japanese layout that types Latin letters, show EN. Small and local to the label; the Japanese Kana variants (which type kana directly), other layouts (DE + Mozc, us,de) and a Korean layout with no engine keep their label.
  2. Show a script glyph for direct input instead (A, matching Mozc's own direct-mode label), for every group that has a composition engine. More uniform across languages, but changes the label for groups that already read fine (EN, DE, FR beside an engine).

AI-Dico avatar Oct 20 '26 09:10 AI-Dico

Opened #16061 with approach 1: direct input on a Korean or JIS layout reads EN when the group has a composition engine, and Kana layouts keep JA. Checked on a Korean first boot: EN for Latin, 한 after Super + I.

AI-Dico avatar Oct 20 '26 11:10 AI-Dico

Checked against quattro at 967bbdd, reading the source and the xkeyboard-config data; nothing was run on a worker for this issue. The cause is as described: for a keyboard-* Fcitx method, inputLabel in shell/plugins/bar/widgets/KeyboardLayoutModel.js:114 returns the compositor layout label, which KeyboardLayout.qml:48 takes from the xkb brief of the active layout. kr(kr104) inherits the brief ko from kr, and xkbcli list --load-exotic prints it that way, so direct input reads KO beside 한. The Japanese JIS layout has the brief ja, so it reads JA beside あ in the same way. Groups whose Latin layout is us read EN, so the problem only shows up on these two layouts.

Codex Medium and muse-spark-1.3 (high) each reviewed this diagnosis as a second opinion, and both agreed with the mechanism. Codex checked the brief against the live xkbcli output. Both pointed out that the label works as written: it names the layout's language, as the comment above shortLabel says. The problem is that the indicator is also used to show the input mode, and on these layouts the language label doesn't tell direct input apart from composition.

The fix is #16061, which already says it closes this issue. It will be reviewed and run on a worker separately. What the direct-input label should be is the maintainer's call, so this is waiting on them.

omarchybot avatar Oct 23 '26 08:10 omarchybot