OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
audio-input low occasional DISPUTE

Make the bar's keyboard-layout switch change the keyboard you type on, not your mouse

omarchyhyprlandwaylandlogitechdesktoplaptop
AUDITED Audited against its sources and confirmed accurate. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

Issue #10135 read in full (open, reproduced on 4.0.2 with a G502 and on 4.0.3 with logitech-usb-receiver). It supports the symptom, the UNTYPED_KEYBOARDS cause and the per-device index evidence. On 4.0.4-1, /usr/share/omarchy/shell/plugins/bar/widgets/KeyboardLayout.qml:76 runs hyprctl switchxkblayout <keyboardName> next and KeyboardLayoutModel.js filters only virtual and ACPI-style names, so the cause holds. The hyprland-wiki source (content/configuring/core/advanced-configuration/using-hyprctl.md) documents switchxkblayout <DEVICE> <CMD> with DEVICE as current or all. The bind uses the o.bind(key, description, command) form shown in the shipped ~/.config/hypr/bindings.lua template, and a grep of /usr/share/omarchy/default/hypr found no SUPER + CTRL + ALT + L binding (only SUPER + L and SUPER + CTRL + L). jq is in omarchy-base.packages. hyprctl reload is documented as a config reload. Not exercised: no layout switch or reload was run on this session.

Symptom

With two layouts configured (for example kb_layout = "pl,de"), clicking the Omarchy bar's keyboard-layout widget changes the label to DE but the keyboard keeps typing Polish. Unplugging a Logitech gaming mouse or USB receiver makes the widget work.

Cause

Logitech mice and receivers expose a keyboard interface, so Hyprland lists them as keyboards (logitech-g502, logitech-usb-receiver). The omarchy.keyboard-layout widget picks one keyboard to switch and filters only known virtual and ACPI-style names (UNTYPED_KEYBOARDS), so it can pick the mouse and run the equivalent of hyprctl switchxkblayout logitech-usb-receiver next. Layouts are per device, so only the mouse switches. hyprctl -j devices shows the mouse on index 1 and the real keyboard still on index 0.

Fix

Confirm which device switched:


hyprctl -j devices | jq -r '.keyboards[] | "\(.name)  \(.active_keymap)"'

Switch every keyboard at once instead of trusting the widget. all is a documented device argument for switchxkblayout:


hyprctl switchxkblayout all next

Bind it (SUPER + CTRL + ALT + L is unused by Omarchy 4.0.4 defaults):


-- ~/.config/hypr/bindings.lua
o.bind("SUPER + CTRL + ALT + L", "Next keyboard layout", "hyprctl switchxkblayout all next")

hyprctl reload

An XKB chord such as grp:alt_shift_toggle in kb_options also works, because it switches the keyboard you press it on. If apps still type the old layout after a successful switch, fcitx5's profile only contains keyboard-us, which is a separate fix.

Verify

After the bind, every keyboard line in hyprctl -j devices shows the same active_keymap, and typing y / z reflects the new layout.

Sources

keyboard-layout-widget-switches-mouse-device