|
1 | | -// TODO: "Automatically switch to a document's input source"를 InputContext로 구현 |
2 | | -// TODO: Safari: 구글 문서, iCloud Pages 한/글/을/입/력 문제... string 가져오기? Safari에서 downgrade 하는 방법 찾기 |
3 | | -// TODO: D->M downgrade: NotificationCenter to Context & memory |
4 | | - |
| 1 | +// swiftlint:disable type_body_length |
5 | 2 | import Cocoa |
6 | 3 | import InputMethodKit |
7 | 4 |
|
@@ -181,7 +178,9 @@ class AppDelegate: NSObject, NSApplicationDelegate { |
181 | 178 | eventContext.strategy.flush(from: state, to: sender) |
182 | 179 | } |
183 | 180 | if withInputMonitor { |
184 | | - inputMonitor.flush() |
| 181 | + var inputs = inputMonitor.flush() |
| 182 | + filterContexts(&inputs) |
| 183 | + inputs.forEach { state.next($0) } |
185 | 184 | } |
186 | 185 | state = State(engine: state.engine) |
187 | 186 | if getKeyboardCapsLock() { |
@@ -333,6 +332,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { |
333 | 332 | } |
334 | 333 | } |
335 | 334 |
|
| 335 | + /** 암호 입력 필드를 위한 ABC 입력기 제한 기능 */ |
336 | 336 | @objc private func suppressABC(_ aNotification: Notification) { |
337 | 337 | debug("\(String(describing: aNotification))") |
338 | 338 |
|
@@ -387,10 +387,11 @@ class AppDelegate: NSObject, NSApplicationDelegate { |
387 | 387 |
|
388 | 388 | guard IsSecureEventInputEnabled() else { return } |
389 | 389 |
|
| 390 | + resetWithInputMonitor() |
390 | 391 | state.engine = state.engines.A |
391 | 392 | statusBar.setEngine(state.engines.A) |
392 | | - resetWithInputMonitor() |
393 | 393 |
|
394 | 394 | debug("abcOnSecureInput 성공") |
395 | 395 | } |
396 | 396 | } |
| 397 | +// swiftlint:enable type_body_length |
0 commit comments