Files
omarchy/docs/input-methods.md
T

4.3 KiB

Input methods

The install keyboard picker selects a console keymap plus an optional Fcitx engine. install/provisioning/setup-form.sh is shared by the ISO configurator and deferred first-boot owner setup. Its rows are label|console keymap|input method|desktop XKB override; the last two fields are optional, so ordinary keyboard choices keep their existing meaning.

The ISO carries the extra fields in omarchy_install.input_method and omarchy_install.input_xkb_layout. Both installation paths persist them in /etc/omarchy/input-method as INPUT_METHOD and XKB_LAYOUT. This file is parsed as data, never sourced. Korean has a real US console keymap and a kr desktop override; Japanese uses jp106, or US when the US-keyboard choice is selected. Console and disk-unlock input remain ordinary keymaps.

install/user/input-method.sh calls omarchy-input-method configure --seed during user finalization, before graphical login. The standard engines are in the base package set so deferred provisioning and factory resets do not need network access to configure typing. default/input-methods/presets.json is the engine catalog used by the post-install selector.

default/input-methods/configure.py owns the shared configuration behavior. Offline seeding replaces only a missing profile or Fcitx's untouched single keyboard-us guess. The group layout matches Hyprland's effective leading layout and variant; non-Latin layouts retain the US-leading behavior used for desktop bindings. The selected composition engine is the group's DefaultIM, with ActiveByDefault=False so initial typing remains Latin. Existing multilingual profiles and explicitly chosen keyboard layouts are preserved.

omarchy setup input installs the selected engine, restarts the supervised Fcitx unit so it discovers new addons, and appends the engine through InputMethodGroupInfo, SetInputMethodGroupInfo, and Save. It keeps the group name, layout, existing methods, and their layout overrides. There is no parallel unsupervised daemon. A per-user D-Bus activation file delegates org.fcitx.Fcitx5 to omarchy-fcitx5.service; it is loaded before live restart.

Shortcut defaults reserve Ctrl+Space for Tmux/Herdr, Super+Space for the menu, Super+Shift+Space for the bar, and Super+grave for the console. Input toggles on Ctrl+Shift+Space, Zenkaku/Hankaku, or Hangul; Henkan activates and Muhenkan deactivates. An existing configured list, including an empty list, is preserved. Stock generated lists are repaired only while the user still has the single-keyboard default profile. A terminal Ctrl+Space returns to direct input before the following key, with a 300 ms timeout and no D-Bus activation; a keyboard-only profile skips this step. Wayland and XCB addons do not override the compositor's XKB settings.

The migration installs the standard engines and applies conservative defaults. It aligns an untouched Fcitx keyboard profile with the install layout, using the live controller when Fcitx is running. It leaves existing multilingual profiles and working trigger keys alone. Atomic file writes follow configuration symlinks, preserve file modes, and roll back on a failed seed or live setup so a retry can complete. Live rollback stops Fcitx before restoring disk, then reloads activation and restarts the unit. Migration bus errors defer profile alignment to the next login and do not restart input. If a pre-update daemon has not discovered a new engine, the migration aligns only its keyboard and prints the setup command.

Input selection does not change the system locale, repository region, desktop language, or Latin interface font. A new language setup seeds a CJK fallback preference once; additional languages do not overwrite it.

Focused checks live in test/shell.d/input-method-test.sh, setup-form-test.sh, hyprland-keyboard-layout-test.sh, and hyprland-jis-bindings-test.sh. test/acceptance.d/input-methods-test.sh exercises real composition in a disposable installed VM and restores the original user configuration. The ISO repository's keyboard tests cover transport and target persistence. Browser input must be verified against the shipped browser versions; the language selector is not a place to guess flags from older guides.

Default key values are checked against Fcitx global configuration.