InputHandler // Force ASCII raw output in cassette mode.
This commit is contained in:
parent
f0866a816c
commit
dfcb99eebe
|
@ -10,6 +10,7 @@
|
||||||
/// 按鍵調度模組要率先處理」的部分。據此判斷是否需要將按鍵處理委派給其它成員函式。
|
/// 按鍵調度模組要率先處理」的部分。據此判斷是否需要將按鍵處理委派給其它成員函式。
|
||||||
|
|
||||||
import CocoaExtension
|
import CocoaExtension
|
||||||
|
import IMKUtils
|
||||||
import LangModelAssembly
|
import LangModelAssembly
|
||||||
import Shared
|
import Shared
|
||||||
|
|
||||||
|
@ -275,6 +276,14 @@ extension InputHandler {
|
||||||
return true
|
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
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue