Repo // Stop committing raw dynamic keylayout chars. (#202)
This commit is contained in:
parent
ae49ee81f3
commit
1e178e948f
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue