ctlIME // Enable Apple ABC keyboard layout for alphanumerical mode.

This commit is contained in:
ShikiSuen 2022-03-01 22:46:03 +08:00
parent 1b060bb328
commit 49038b9cb3
1 changed files with 6 additions and 0 deletions

View File

@ -182,6 +182,12 @@ class ctlInputMethod: IMKInputController {
} }
override func handle(_ event: NSEvent!, client: Any!) -> Bool { override func handle(_ event: NSEvent!, client: Any!) -> Bool {
if (Preferences.isAlphanumericalModeEnabled) {
(client as? IMKTextInput)?.overrideKeyboard(withKeyboardNamed: Preferences.functionKeyboardLayout)
return false
}
if event.type == .flagsChanged { if event.type == .flagsChanged {
let functionKeyKeyboardLayoutID = Preferences.functionKeyboardLayout let functionKeyKeyboardLayoutID = Preferences.functionKeyboardLayout
let basisKeyboardLayoutID = Preferences.basisKeyboardLayout let basisKeyboardLayoutID = Preferences.basisKeyboardLayout