InputHandler // Force ASCII raw output in cassette mode.

This commit is contained in:
ShikiSuen 2022-10-19 01:05:45 +08:00
parent f0866a816c
commit dfcb99eebe
1 changed files with 9 additions and 0 deletions

View File

@ -10,6 +10,7 @@
/// 調
import CocoaExtension
import IMKUtils
import LangModelAssembly
import Shared
@ -275,6 +276,14 @@ extension InputHandler {
return true
}
// Apple RAW ABC
if IMKHelper.isDynamicBasicKeyboardLayoutEnabled, let event = input as? NSEvent,
prefs.cassetteEnabled, let txtABC = event.inAppleABCStaticForm.characters, !txtABC.isEmpty
{
delegate.switchState(IMEState.ofCommitting(textToCommit: txtABC))
return true
}
return false
}
}