Repo // Stop committing raw dynamic keylayout chars. (#202)

This commit is contained in:
ShikiSuen 2022-10-27 13:46:01 +08:00
parent ae49ee81f3
commit 1e178e948f
2 changed files with 7 additions and 10 deletions

View File

@ -277,14 +277,6 @@ 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
}
}

View File

@ -136,10 +136,15 @@ extension SessionCtl {
if shouldUseShiftToggleHandle { rencentKeyHandledByInputHandlerEtc = result }
if !result {
// .ofMarking
if [.ofEmpty].contains(state.type) {
tooltipInstance.hide()
if [.ofEmpty].contains(state.type) { tooltipInstance.hide() }
// Apple RAW ABC
if IMKHelper.isDynamicBasicKeyboardLayoutEnabled, event.text != eventToDeal.text {
switchState(IMEState.ofCommitting(textToCommit: eventToDeal.text))
return true
}
}
return result
}
}