From e0e6225fac0681ee97a0eb64ee1400dc6aae9bac Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 9 Oct 2026 13:41:17 +0200 Subject: [PATCH] Use Super+I for input switching independently of Fcitx keys --- bin/omarchy-menu-keybindings | 1 - config/fcitx5/config | 7 +++---- default/hypr/bindings/input-method.lua | 8 ++++++++ docs/input-methods.md | 2 +- manual/34-keyboard-mouse-trackpad.md | 4 ++-- shell/plugins/bar/widgets/KeyboardLayoutModel.js | 2 +- test/shell.d/hyprland-jis-bindings-test.sh | 5 +++++ test/shell.d/input-method-checks.py | 2 +- test/shell.d/keybindings-menu-test.sh | 3 ++- test/shell.d/keyboard-layout-test.sh | 2 +- 10 files changed, 24 insertions(+), 12 deletions(-) diff --git a/bin/omarchy-menu-keybindings b/bin/omarchy-menu-keybindings index 1d00e5f5..526c91be 100755 --- a/bin/omarchy-menu-keybindings +++ b/bin/omarchy-menu-keybindings @@ -332,7 +332,6 @@ dynamic_bindings() { static_bindings() { echo "SHIFT ALT,L,Copy URL from Web App,sendshortcut,SHIFT ALT,L," echo "SHIFT ALT,D,Download Video from Web App,sendshortcut,SHIFT ALT,D," - echo "CTRL SHIFT,SPACE,Switch input language,exec,fcitx5-remote -t" } # Actions Omarchy binds to a second chord meant as an alternative, named one at diff --git a/config/fcitx5/config b/config/fcitx5/config index 3609ca02..7ef67e6d 100644 --- a/config/fcitx5/config +++ b/config/fcitx5/config @@ -1,8 +1,7 @@ -# Leave Ctrl+Space to tmux/Herdr and the Super shortcuts to the desktop. +# Omarchy binds Super+I. Leave Ctrl+Space to tmux/Herdr and other Super keys to the desktop. [Hotkey/TriggerKeys] -0=Control+Shift+space -1=Zenkaku_Hankaku -2=Hangul +0=Zenkaku_Hankaku +1=Hangul [Hotkey/ActivateKeys] 0=Henkan diff --git a/default/hypr/bindings/input-method.lua b/default/hypr/bindings/input-method.lua index 2fe813e5..693ea419 100644 --- a/default/hypr/bindings/input-method.lua +++ b/default/hypr/bindings/input-method.lua @@ -33,6 +33,14 @@ local function has_input_method() return found end +-- Keep the desktop shortcut independent of Fcitx's custom switching keys. +-- Checking the profile on demand lets live setup work without a reload. +o.bind("SUPER + I", "Switch input language", function() + if has_input_method() then + hl.exec_cmd("fcitx5-remote --check -t") + end +end) + -- Preserve custom Ctrl + Space triggers. Without a -- [Hotkey/TriggerKeys] list in the config, fcitx5 uses its default, which has -- Ctrl + Space. diff --git a/docs/input-methods.md b/docs/input-methods.md index af1ca8c2..4b01615f 100644 --- a/docs/input-methods.md +++ b/docs/input-methods.md @@ -10,7 +10,7 @@ The ISO carries the extra fields in `omarchy_install.input_method` and `omarchy_ `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. +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. Hyprland owns Super+I to toggle input independently of Fcitx switching keys. Fcitx handles Zenkaku/Hankaku and 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. diff --git a/manual/34-keyboard-mouse-trackpad.md b/manual/34-keyboard-mouse-trackpad.md index 0dd32753..a88f78f5 100644 --- a/manual/34-keyboard-mouse-trackpad.md +++ b/manual/34-keyboard-mouse-trackpad.md @@ -61,13 +61,13 @@ On Dell XPS laptops with a haptic touchpad, you can also set the click strength Select Japanese, Korean, Chinese (Simplified, Pinyin), or Chinese (Traditional, Zhuyin) when the installer asks for your keyboard. Omarchy configures the keyboard and matching input engine automatically, including during offline first-boot setup. Japanese uses Mozc, Korean uses standard two-set Hangul, Simplified Chinese uses Pinyin, and Traditional Chinese uses Chewing's standard Zhuyin arrangement. Japanese (US keyboard) provides Mozc with a US keyboard layout. -Typing starts in Latin mode. Press `Ctrl + Shift + Space` to switch input on or off. On Japanese keyboards, 全角/半角 toggles input, 変換 turns it on, and 無変換 turns it off. On a Korean keyboard layout, dedicated 한/영 and 한자 keys switch Hangul and convert to Hanja. `Ctrl + Space` stays available for Tmux and Herdr; CapsLock stays the compose key. +Typing starts in Latin mode. Press `Super + I` to switch input on or off. On Japanese keyboards, 全角/半角 toggles input, 変換 turns it on, and 無変換 turns it off. On a Korean keyboard layout, dedicated 한/영 and 한자 keys switch Hangul and convert to Hanja. `Ctrl + Space` stays available for Tmux and Herdr; CapsLock stays the compose key. The keyboard indicator in the menu bar appears for non-English keyboards and whenever you have multiple layouts or input modes. Click it to switch input languages; Japanese displays あ for hiragana. With only one input mode, clicking opens input language setup. For Japanese character choices, switch to Japanese, type a word such as `nihongo`, then press Space twice. Press Enter to accept your choice. If you also have multiple keyboard layouts, right-click the indicator to cycle those. To add another language later, use _Setup > Input Language_ or run `omarchy setup input` (or `omarchy setup input mozc`, `hangul`, `pinyin`, or `chewing`). Your existing input methods and custom switching keys are preserved. For alternative engine layouts or keys, install `fcitx5-configtool` with `omarchy pkg add fcitx5-configtool` and launch it from a terminal. Selecting an input language does not change the desktop language. -On keyboards without dedicated input keys, use `Ctrl + Shift + Space`. This input shortcut takes precedence over app shortcuts such as code completion; you can change it in `fcitx5-configtool`. Tapping Shift alone is not an input switch: Omarchy uses both Shift keys for CapsLock, which changes how input methods see Shift release. Input engines and the CapsLock compose sequences use the [Fcitx5](https://fcitx-im.org/) service already running in every session. +Use `Super + I` to toggle input. This desktop binding works alongside your existing Fcitx switching keys; you can override it in `~/.config/hypr/bindings.lua`. Tapping Shift alone is not an input switch: Omarchy uses both Shift keys for CapsLock, which changes how input methods see Shift release. Input engines and the CapsLock compose sequences use the [Fcitx5](https://fcitx-im.org/) service already running in every session. ### Use ALT as SUPER diff --git a/shell/plugins/bar/widgets/KeyboardLayoutModel.js b/shell/plugins/bar/widgets/KeyboardLayoutModel.js index b1ee1cf8..c9888ec5 100644 --- a/shell/plugins/bar/widgets/KeyboardLayoutModel.js +++ b/shell/plugins/bar/widgets/KeyboardLayoutModel.js @@ -120,7 +120,7 @@ function inputLabel(state, fallback) { function inputTooltip(state, layout, multipleLayouts) { if (!state || !state.methods || state.methods.length < 2) return layout + (multipleLayouts ? "" : "\nClick to set up an input language") - var text = state.name + "\nClick to switch input language\nCtrl + Shift + Space to toggle input" + var text = state.name + "\nClick to switch input language\nSuper + I to toggle input" if (state.methods.indexOf("mozc") !== -1) text += "\nJapanese: type a word, then Space twice for character choices" if (multipleLayouts) text += "\nRight-click to switch keyboard layout" diff --git a/test/shell.d/hyprland-jis-bindings-test.sh b/test/shell.d/hyprland-jis-bindings-test.sh index 5a842d8f..eaf4cc81 100755 --- a/test/shell.d/hyprland-jis-bindings-test.sh +++ b/test/shell.d/hyprland-jis-bindings-test.sh @@ -126,3 +126,8 @@ done TEST_KEYBOARD_ONLY=true TEST_FCITX5_CONFIG=$freed assert_fires "keyboard-only profiles skip the terminal controller call" \ "non_consuming" "$prefix" "foot" "terminal" + +assert_fires "Super + I toggles configured input independently of custom Fcitx keys" \ + "exec fcitx5-remote --check -t" "SUPER + I" "chromium" +TEST_KEYBOARD_ONLY=true assert_fires "Super + I leaves keyboard-only profiles alone" \ + "" "SUPER + I" "foot" "terminal" diff --git a/test/shell.d/input-method-checks.py b/test/shell.d/input-method-checks.py index 981b0f18..30baa8ec 100644 --- a/test/shell.d/input-method-checks.py +++ b/test/shell.d/input-method-checks.py @@ -63,7 +63,7 @@ class InputMethodTest(unittest.TestCase): keys = setup.sections((self.config / "fcitx5/config").read_text()) self.assertEqual(keys["Behavior"]["ActiveByDefault"], "False") self.assertNotIn("Control+space", keys["Hotkey/TriggerKeys"].values()) - self.assertIn("Control+Shift+space", keys["Hotkey/TriggerKeys"].values()) + self.assertEqual(set(keys["Hotkey/TriggerKeys"].values()), {"Zenkaku_Hankaku", "Hangul"}) def test_vconsole_variants_quotes_and_japanese_without_preference(self): self.preference.unlink() diff --git a/test/shell.d/keybindings-menu-test.sh b/test/shell.d/keybindings-menu-test.sh index f5a06906..ed23dd32 100755 --- a/test/shell.d/keybindings-menu-test.sh +++ b/test/shell.d/keybindings-menu-test.sh @@ -53,6 +53,7 @@ stub_hyprctl <