File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import Carbon
22import Foundation
33
4- /// Monitors input source changes and notifies the user when the system
5- /// switches to the standard ABC keyboard layout (which can happen
6- /// unexpectedly due to macOS behaviour), offering a one-tap action to
7- /// switch back to Lexime via macnotifier .
4+ /// Monitors input source changes and automatically reverts unexpected
5+ /// switches to the standard ABC keyboard layout (which can happen due to
6+ /// macOS IMKit race conditions) back to Lexime Roman, with secure input
7+ /// awareness (polls for release before reverting) .
88final class InputSourceMonitor : NSObject {
99
1010 private static let abcSourceID = " com.apple.keylayout.ABC "
11- private static let leximeJapaneseID = " sh.send.inputmethod.Lexime.Lexime.Japanese "
11+ // Runtime IDs include the bundle ID prefix, so they are "Lexime.Lexime.*"
12+ // rather than the bare "Lexime.*" declared in Info.plist's tsInputModeListKey.
1213 private static let leximeRomanID = " sh.send.inputmethod.Lexime.Lexime.Roman "
1314
1415 /// Suppress notifications for this many seconds after init (avoid startup noise).
You can’t perform that action at this time.
0 commit comments