From 49038b9cb3dae69c79248788a80ac681a8f6bc3a Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 1 Mar 2022 22:46:03 +0800 Subject: [PATCH] ctlIME // Enable Apple ABC keyboard layout for alphanumerical mode. --- Source/Modules/IMEModules/ctlInputMethod.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Modules/IMEModules/ctlInputMethod.swift b/Source/Modules/IMEModules/ctlInputMethod.swift index b9660837..655f26ac 100644 --- a/Source/Modules/IMEModules/ctlInputMethod.swift +++ b/Source/Modules/IMEModules/ctlInputMethod.swift @@ -182,6 +182,12 @@ class ctlInputMethod: IMKInputController { } override func handle(_ event: NSEvent!, client: Any!) -> Bool { + + if (Preferences.isAlphanumericalModeEnabled) { + (client as? IMKTextInput)?.overrideKeyboard(withKeyboardNamed: Preferences.functionKeyboardLayout) + return false + } + if event.type == .flagsChanged { let functionKeyKeyboardLayoutID = Preferences.functionKeyboardLayout let basisKeyboardLayoutID = Preferences.basisKeyboardLayout