ctlIME // +setKeyLayout().

This commit is contained in:
ShikiSuen 2022-03-25 22:43:27 +08:00
parent 6576311606
commit 770cc858d6
1 changed files with 7 additions and 0 deletions

View File

@ -61,6 +61,13 @@ class ctlInputMethod: IMKInputController {
static var currentKeyHandler: KeyHandler = KeyHandler()
@objc static var currentInputMode = ""
// MARK: - Keyboard Layout Specifier
@objc func setKeyLayout(isfunctionKeyboardLayout: Bool = false) {
let client = client().self as IMKTextInput
client.overrideKeyboard(withKeyboardNamed: isfunctionKeyboardLayout ? mgrPrefs.functionKeyboardLayout : mgrPrefs.basisKeyboardLayout)
}
// MARK: - IMKInputController methods
override init!(server: IMKServer!, delegate: Any!, client inputClient: Any!) {