Skip to content

Stop fcitx5 from taking Super+Space from the Omarchy menu - #14027

Open
jaredpohl wants to merge 1 commit into
omacom:quattrofrom
jaredpohl:fix/fcitx-super-space
Open

jaredpohl wants to merge 1 commit into
omacom:quattrofrom
jaredpohl:fix/fcitx-super-space

Conversation

@jaredpohl

Copy link
Copy Markdown

Summary

Omarchy binds Super+Space to the menu and Super+Shift+Space to the top-bar toggle, and starts fcitx5 in every session so ~/.XCompose works. fcitx5's compiled defaults bind those same chords to switching input-method groups. With only the US keyboard loaded, the press does nothing and Hyprland never sees it.

This ships config/fcitx5/config with those two hotkeys cleared. New users get it from /etc/skel. Existing users get it from migration 1790924851 only when ~/.config/fcitx5/config is missing, so a switch key someone already chose is left alone. A running fcitx5 is told to reload; with no graphical session the next start reads the file.

Testing

  • bash test/shell.d/fcitx-super-space-migration-test.sh
  • ./test/all also run. The new test passes. The other failures on this machine are the existing missing omarchy-pkgs checkout, kernel-header, snapper, video-background, and Windows VM mount checks, not this change.

fcitx5's defaults bind Super+Space and Super+Shift+Space to input-method
group switching. Omarchy starts fcitx5 in every session for XCompose, so
those chords never reach the menu or the top-bar toggle. Ship a config
that clears both hotkeys, and install it for existing users only when
they have not written their own.
@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Adds keyboard input method configuration and migration.

The PR appears safe to merge; the remaining issue is a non-blocking gap in verification of the effective hotkeys.

Findings

  1. P2 Effective hotkeys go untested ▶

Summary

The PR adds an fcitx5 configuration that clears the two group-switching shortcuts and a migration that installs it only when the user has no differing config.

  • The migration reloads an active fcitx5 process and leaves a failed reload pending for retry.
  • The new shell test covers copying, preservation, and retry behavior, but does not verify fcitx5’s effective hotkeys.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Run migration] --> B{User config differs from shipped?}
  B -- Yes --> C[Preserve config and finish]
  B -- No --> D{User config missing?}
  D -- Yes --> E[Copy shipped config]
  D -- No --> F{fcitx5 service active?}
  E --> F
  F -- No --> G[Finish; next start reads config]
  F -- Yes --> H[Request ReloadConfig]
  H --> I{Reload succeeds?}
  I -- Yes --> G
  I -- No --> J[Leave migration pending for retry]
Loading

Reviews (1) · Last reviewed commit: "Stop fcitx5 from taking Super+Space from..."

Comment on lines +51 to +59
grep -F '[Hotkey/EnumerateGroupForwardKeys]' "$shipped" >/dev/null ||
fail "shipped fcitx config clears the forward group hotkey"
grep -F '[Hotkey/EnumerateGroupBackwardKeys]' "$shipped" >/dev/null ||
fail "shipped fcitx config clears the backward group hotkey"
grep -F 'Super+space' "$shipped" >/dev/null &&
fail "shipped fcitx config still binds Super+space"
grep -F 'Super+Shift+space' "$shipped" >/dev/null &&
fail "shipped fcitx config still binds Super+Shift+space"
pass "shipped fcitx config leaves Super+Space and Super+Shift+Space to Hyprland"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Effective hotkeys go untested The assertions check only that the config has two section names and lacks literal key strings. They would still pass if fcitx5 stopped treating those empty sections as cleared hotkeys, leaving the menu shortcut consumed. Add a check of the effective forward and backward group hotkeys so the test catches that regression.

@jandrusk

jandrusk commented Oct 6, 2026

Copy link
Copy Markdown

Thanks! Two questions to help review:

  1. Is there an issue or repro for this? I'd like to confirm that fcitx5 really consumes Super+Space before Hyprland's bind on a stock install with only us loaded, for example with a wev trace, or by showing that omarchy menu starts opening once fcitx5 reloads with this config.
  2. The migration only installs the file when ~/.config/fcitx5/config is missing. Anyone who has ever saved settings in fcitx5-configtool already has that file with Super+space still bound, so they'd keep the bug. Clearing just the two [Hotkey/EnumerateGroup*Keys] sections in an existing file, or at least printing a hint, would cover them.

The migration timestamp 1790924851 doesn't collide with quattro or any open PR.

@omarchybot omarchybot added the bug Something isn't working label Oct 15, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for tracking this down. The bug is real, but quattro has since fixed it, so I recommend closing this pull request as superseded by #14433 (0b9dace). That PR ships the same two empty hotkey sections in config/fcitx5/config, which is also why this branch now conflicts, and its migration 1791367434 runs omarchy-input-method configure --defaults for existing installs.

What I checked, on a worker VM linked to quattro at c582e1d:

  • The bug: with no ~/.config/fcitx5/config, the running fcitx5 reports EnumerateGroupForwardKeys=Super+space and EnumerateGroupBackwardKeys=Shift+Super+space (read from its live config over D-Bus).
  • Quattro's fix: after omarchy-input-method configure --defaults, both lists are empty, in the file and in the running fcitx5.
  • The case @jandrusk raised, a config already saved with 0=Super+space and 0=Shift+Super+space: the same command empties both lists, in the file and live. Quattro covers it and this branch does not.

There's one gap, and it isn't one this branch would close cleanly. For a profile that isn't the stock US-only one (say a keyboard-de group from an older install) with no saved config, defaults() in default/input-methods/configure.py skips every Hotkey/ section on purpose to keep existing IME shortcuts, so fcitx's compiled Super+space stays bound. This migration (1790924851) sorts before 1791367434. On such an install it would copy quattro's whole shipped config, not just the two cleared lists, and that would also change inherited Hangul_Hanja/Hangul_Romaja activation keys to Henkan/Muhenkan. That's the change #14433 avoids. On installs that already ran 1791367434, the config file exists and this migration does nothing. If that population should be fixed, it needs a narrower change that clears only the two group lists, and whether to do that is the maintainer's call. I read this in the code but didn't reproduce it on a worker.

Second opinion: Codex Medium reviewed the PR against current quattro. It agreed that quattro fixes the stock case, and its independence from my reasoning is not guaranteed. On its own it raised the non-stock-profile gap and the effect on the Hangul activation keys described above, and I confirmed both by reading the code. I didn't run this branch's test suite, because the change is already on quattro.

Waiting on the maintainer: close as superseded, or ask for a narrower fix for non-stock profiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants