Skip to content

Let search take Chinese input - #84

Merged
gahingwoo merged 1 commit into
mainfrom
fix/search-ime
Oct 30, 2026
Merged

gahingwoo merged 1 commit into
mainfrom
fix/search-ime

Conversation

@gahingwoo

Copy link
Copy Markdown
Owner

Bug: pinyin couldn't be typed into the ⌘K search box, only Latin letters. That makes Chinese search words like 刷机 or 备份 unusable from the keyboard.

Cause: the box was a Qt.Popup window, and macOS gives popup windows no input method.

Fix: it's now a panel inside the main window (a child widget with a drop shadow), so its field gets the input method like every other field. It looks the same and opens in the same place.

  • It closes on Escape, a click elsewhere in the window, or the focus moving away.
  • Escape is taken at ShortcutOverride, so the window's Escape (Cancel) shortcut doesn't fire.
  • The application-wide click filter is installed only while the panel is open.

Tests:

  • check_search checks that the panel isn't a window, and that a composing input-method event ("bei") followed by a commit ("备份") fills the field.
  • Full smoke run passes locally.
  • Typing pinyin with the real macOS input method still needs checking by hand.

The search box was a Qt.Popup window, and macOS gives popup windows no
input method: pinyin couldn't be typed into it, only Latin letters.
It's now a panel inside the main window, with a drop shadow, so its
field takes input like any other. A click elsewhere in the window, the
focus moving away, or Escape (taken before the window's Cancel
shortcut) closes it; the click filter is installed only while it's
open.
@gahingwoo
gahingwoo merged commit 4f9dc77 into main Oct 30, 2026
5 checks passed
@gahingwoo
gahingwoo deleted the fix/search-ime branch October 30, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant