Repository navigation
Let search take Chinese input - #84
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.Popupwindow, 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.
ShortcutOverride, so the window's Escape (Cancel) shortcut doesn't fire.Tests:
check_searchchecks that the panel isn't a window, and that a composing input-method event ("bei") followed by a commit ("备份") fills the field.