Show English mode in the input method icon
macOS: the input method now has two input modes in Info.plist, 中英自動 ("注")
and 英文 ("A"), each with its own menu-bar icon. A Shift tap with nothing typed
switches the mode (TISSelectInputSource), and choosing a mode in the menu bar
switches the engine (setValue:forTag:). --register enables both modes.
Windows: the taskbar IME icon switches between icon.ico and icon-en.ico.
Linux: the IBus mode property also switches its icon.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -133,6 +133,16 @@ final class EngineTests: XCTestCase {
|
||||
return out
|
||||
}
|
||||
|
||||
/// The menu-bar input mode can switch English mode directly.
|
||||
func testSetEnglishMode() {
|
||||
let e = makeEngine()
|
||||
e.setEnglishMode(true)
|
||||
XCTAssertTrue(e.isEnglishMode)
|
||||
XCTAssertEqual(e.handle(.character("a")).handled, false) // goes to the app
|
||||
e.setEnglishMode(false)
|
||||
XCTAssertEqual(type("su3cl3 ", into: e), "你好")
|
||||
}
|
||||
|
||||
func testMixedSentence() {
|
||||
let e = makeEngine()
|
||||
// 我 + "hello world " + 你好
|
||||
|
||||
Reference in New Issue
Block a user