Skip to content

Commit a4e2100

Browse files
sendclaude
andcommitted
fix: remove unused leximeJapaneseID and update doc comment
Address Copilot review: - Remove unused leximeJapaneseID constant - Update class doc comment to reflect auto-revert behavior (no longer uses macnotifier notifications) - Add comment explaining runtime ID prefix difference from Info.plist Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4b13aaf commit a4e2100

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

Sources/InputSourceMonitor.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import Carbon
22
import 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).
88
final 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).

0 commit comments

Comments
 (0)