shift:both_capslock_cancel (default kb_options) breaks fcitx5 Shift toggle for Chinese/English input
System details
- Omarchy: 4.0.0-1 - Hyprland: 0.56.2 (Lua config) - Kernel: 7.1.8-arch1-3 - fcitx5: 5.1.21-1 (+ fcitx5-chewing) - Terminal: ghostty 1.3.1
What's wrong?
With the default kb_options = "compose:caps,shift:both_capslock_cancel", the left Shift key cannot be used as a modifier-only trigger to toggle Chinese/English in fcitx5. A quick tap of the physical Shift while the Chinese input method is active does nothing.
The same config works fine with keys injected through a virtual keyboard (wtype), which is why this is easy to miss.
Root cause
shift:both_capslock_cancel defines the Shift keys with an XKB ALPHABETIC two-level mapping:
key <LFSH> {[ Shift_L, Caps_Lock ], type[group1]="ALPHABETIC" };
fcitx5 key_trace (fcitx5 --verbose key_trace=5) shows the physical Shift press/release pair:
PRESS: Key(Shift_L states=0) rawKey: Key(Shift_L states=16) keycode: 50
RELEASE: Key(Shift+Caps_Lock states=1) rawKey: Key(Shift+Caps_Lock states=1) keycode: 50
The release event's keysym is Caps_Lock, not Shift_L. fcitx5's modifier-only trigger handling (Instance::canAltTrigger / trigger keys, instance.cpp keyHandlers release path) matches release via
Key::isReleaseOfModifier(lastKeyPressed), which fails when the release keysym differs. So the toggle never fires for a physical Shift tap.
Expected behavior
Tapping left Shift while Chinese input is active should toggle to English (and back), like it does on every other fcitx5 setup.
Workaround (verified)
Override kb_options in ~/.config/hypr/input.lua:
hl.config({
input = {
kb_options = "compose:caps",
},
})
After hyprctl reload, the release keysym becomes Shift+Shift_L and the toggle works.
Impact / related
- Affects any fcitx5 user relying on a Shift-based toggle (fcitx5's default AltTriggerKeys is Shift_L), i.e. basically all Chinese/Japanese input users on Omarchy 4.0.
- #7255 reports another bug from the same option (Caps Lock stuck ON after the Quattro migration).
- #7346 reports the same symptom (Shift cannot toggle Chinese/English) but with a different root cause (Hyprland 0.56.2 dropping modifier release events); both may affect 4.0 users.
- Suggestion: drop shift:both_capslock_cancel from the default kb_options, or pick a Caps-Lock-home that doesn't rewrite the Shift keysym (e.g. caps:escape with compose elsewhere).
Confirmed on Omarchy 4.0.0 as well (Hyprland 0.56.x Lua config, fcitx5 5.1.21-1 + fcitx5-rime). Adding three data points that cost me some debugging rounds and may help others landing here:
1. Also affects Japanese setups, not just Chinese/TW
My group is [rime, keyboard-jp] — same symptom, same root cause. One extra trap worth flagging: wtype-injected Shift events arrive as clean Key(Shift_L states=0) and toggle fine, while physical taps arrive as Key(Shift+Caps_Lock states=17) and never match. So injection-based testing passes while every physical keypress fails, which makes it easy to wrongly blame individual apps (I briefly suspected kitty).
2. Runtime key_trace without restarting fcitx5
Instead of restarting with --verbose:
busctl --user call org.fcitx.Fcitx5 /controller org.fcitx.Fcitx.Controller1 SetLogRule s "*=5"
journalctl --user -u omarchy-fcitx5.service -o cat -f
After applying the OP's workaround, the release becomes clean again and the hotkey matches:
KeyEvent: Key(Shift_L states=0) rawKey: Key(Shift_L states=16) ... Release:1 keycode: 50 program: firefox
3. Two extra fcitx5-side gotchas when restoring Shift toggle
-
Inline assignment is silently ignored: writing
EnumerateForwardKeys=Shift_Ldoes nothing (no error, no effect). The key list must use the numbered-section syntax:[Hotkey] EnumerateForwardKeys= [Hotkey/EnumerateForwardKeys] 0=Shift_L -
In my testing the compiled-in default
AltTriggerKeys=Shift_Lonly switches back to the first input method of the group, i.e. it is not a bidirectional toggle. For a true round-trip between two IMs (rime↔keyboard-jp), bindEnumerateForwardKeysinstead.
With both the kb_options override from the OP and the section-syntax binding above, single-tap left Shift now toggles reliably in Firefox address bar and other text fields. (kitty terminal remains unreliable at forwarding bare modifiers to the IME — that part is a kitty limitation, not omarchy's.)
+1 for dropping shift:both_capslock_cancel from the defaults or relocating Caps Lock somewhere that doesn't rewrite the Shift keysym.
Same root cause, a third independent consumer: remote-desktop clients. Worth adding because the blast radius is wider than input methods, and the symptom looks nothing like a keyboard-layout problem, so it is easy to blame the remote-desktop app.
Symptom
Omarchy 4.0.0-1, Hyprland 0.56.2, xorg-xwayland 24.1.13-1, libxkbcommon 1.13.2-1, layout fr(mac) on an Apple ISO keyboard (MacBookPro15,1, T2). Splashtop Business 3.8.2.0 Linux client — Qt5/xcb, so it runs on XWayland and links xcb-util-keysyms.
One tap of either physical Shift latches the remote machine into Caps Lock, and it stays latched until the next Shift tap. There is no way to type a single capital letter. Nothing appears in the client log; it looks exactly like a broken remote-desktop port.
Mechanism
The OP's key_trace already has it — the release carries the wrong keysym:
PRESS: Key(Shift_L states=0) keycode: 50
RELEASE: Key(Shift+Caps_Lock states=1) keycode: 50
At release time Shift is still down, so the ALPHABETIC type resolves level 2 of <LFSH> and hands out Caps_Lock. A client that forwards keysyms to a remote host therefore sends Shift down, and then Caps_Lock instead of the Shift up. The remote is left with Shift never released and its Caps Lock toggled — which is precisely the observed behaviour.
Confirming the mapping without touching the running session:
$ xkbcli compile-keymap --layout fr --variant mac --model pc105 \
--options "compose:caps,shift:both_capslock_cancel" | grep -A3 'key <LFSH>'
key <LFSH> {
type= "ALPHABETIC",
symbols[1]= [ Shift_L, Caps_Lock ]
};
versus, with the option dropped:
$ xkbcli compile-keymap --layout fr --variant mac --model pc105 \
--options "compose:caps" | grep -A3 'key <LFSH>'
key <LFSH> { [ Shift_L ] };
Both reports above note that wtype-injected Shift is clean while physical taps are not; that distinction matters here too, since only clients reading real XWayland key events can hit this.
Workaround (verified)
Identical to the OP's — override kb_options in ~/.config/hypr/input.lua:
hl.config({
input = {
kb_options = "compose:caps",
},
})
After hyprctl reload, restart the remote-desktop client: it caches the keymap at startup, so a reload alone is not enough.
Impact
Anything that forwards keysyms rather than raw evdev codes is affected, not just Splashtop — VNC and RDP clients, and browser-based remote consoles, all resolve a keysym per key event. Users hitting this have no reason to suspect kb_options, since local typing is completely normal.
+1 for dropping shift:both_capslock_cancel from the default kb_options. If Caps Lock needs a home, one that does not rewrite the Shift keysym would fix this class of bug outright.
I independently reproduced another application-level failure caused by the same default shift:both_capslock_cancel option: RustDesk sends false Shift-clicks when controlling a Windows host from Omarchy/Hyprland.
System and application
- Omarchy
4.0.1-1 - Kernel
7.1.9-arch1-2 - RustDesk
1.4.9-1(also reproduced with 1.4.8) - Local/controller: Omarchy + Hyprland
- Remote/controlled: Windows
Symptom
- Connect from Omarchy to Windows with RustDesk.
- Press and release either physical Shift key once.
- Subsequent ordinary mouse clicks are sent to Windows with Shift associated with each click.
- Windows On-Screen Keyboard briefly flashes Shift for every click; Shift is not simply held continuously.
- Pressing and releasing Shift again does not clear it. Clicking RustDesk's own toolbar immediately clears the bad state until Shift is used again.
This reproduced in both RustDesk Map and Translate keyboard modes and with both Shift keys.
Backend and keymap evidence
The active RustDesk GUI was native Wayland (hyprctl clients -j reported xwayland: false) with XDG_SESSION_TYPE=wayland and WAYLAND_DISPLAY=wayland-1.
The effective Hyprland option was:
compose:caps,shift:both_capslock_cancel
Loading the effective compositor keymap with xkbcli interactive-wayland --verbose produced:
Key "<LFSH>" added to modifier map for multiple modifiers;
Using Lock, ignoring Shift
This agrees with the root cause already documented here: the option changes both Shift keys to ALPHABETIC two-level Shift_*/Caps_Lock mappings. In this case, the unusual release/modifier state appears to corrupt Flutter/RustDesk's pressed-modifier bookkeeping, after which RustDesk adds Shift to later mouse events. The fact that clicking RustDesk's toolbar clears the state is consistent with its focus/input state being reset.
Confirmed A/B test and fix
I first changed only the live Hyprland state:
hyprctl eval 'hl.config({ input = { kb_options = "compose:caps" } })'
The RustDesk bug immediately stopped reproducing. I then made the same personal override in ~/.config/hypr/input.lua, reloaded Hyprland, and verified:
hyprctl configerrors # no errors
hyprctl getoption input:kb_options
str: compose:caps
set: true
The fix survives reload/logout/reboot and preserves Caps as Compose while restoring normal Shift behavior.
This is therefore a second, independently verified regression from the same Omarchy default, affecting remote-desktop input in addition to fcitx5. It strengthens the case for removing shift:both_capslock_cancel from the default kb_options rather than requiring application-specific workarounds.
Reproduced on a worker built from the Omarchy ISO, and the open pull request #10565 fixes it. Reviewed by Claude Opus 5.5, with Codex Medium as the second opinion.
Reproduction. A physical left-Shift tap, sent through a uinput keyboard into a focused foot window, with fcitx5's trigger bound to Shift_L and a keyboard-us/keyboard-de group:
- On
quattro's defaultkb_options(compose:caps,shift:both_capslock_cancel), fcitx5's key trace shows the release asKey(Shift+Caps_Lock states=1)and the input method never changes. - At #10565's head (b298bca, which sets the default to
compose:caps), the release isKey(Shift+Shift_L states=1)and each tap toggles us → de → us. - At the same head with only
default/hypr/input.luareverted toquattro, it fails again exactly as onquattro.
This is the mechanism you described: the option makes <LFSH> an ALPHABETIC key with Caps_Lock on level 2, so while Shift is still held its release resolves to Caps_Lock, and fcitx5's isReleaseOfModifier check never matches the Shift_L press. Omarchy ships no fcitx5 hotkey configuration, so fcitx5's compiled-in AltTriggerKeys=Shift_L is the one that breaks for anyone who adds an input method. Going back to shift:both_capslock would not help, because it also puts Caps_Lock on level 2 of both Shift keys. Codex agreed with the mechanism and contributed that last point. It could not reach GitHub from its sandbox, so it worked from the repository and the issue text, and its agreement is not guaranteed to be independent.
Related. #10545 (XWayland treats left Shift as a lock key) and #14139 (layout resets in Qt/fcitx5 apps) have the same cause and the same fix. #7346 reports the same symptom with a different proposed cause (dropped release events), so it is not treated as a duplicate.
Not linked yet. I tried to add Fixes #7440 to #10565, but omabot refused because the pull request has had new commits since it was last classified, so the two are not linked yet.
Next. This waits on the maintainer: #10565 removes the both-Shifts Caps Lock that 63e57e1 added on purpose, so whether to drop that shortcut is their decision. Until then, the workaround in the report, kb_options = "compose:caps" in ~/.config/hypr/input.lua followed by restarting fcitx5, is the same default #10565 sets.