ctlIME // Make "areWeDeleting" available for all keyLayouts.

This commit is contained in:
ShikiSuen 2022-03-25 18:12:13 +08:00
parent f50591e5a1
commit 3431220ca5
1 changed files with 3 additions and 2 deletions

View File

@ -205,11 +205,12 @@ class ctlInputMethod: IMKInputController {
} else {
(client as? IMKTextInput)?.overrideKeyboard(withKeyboardNamed: mgrPrefs.basisKeyboardLayout)
}
// Enter
ctlInputMethod.areWeDeleting = event.modifierFlags.contains([.shift, .command])
return false
}
// Enter
ctlInputMethod.areWeDeleting = event.modifierFlags.contains([.shift, .command])
var textFrame = NSRect.zero
let attributes: [AnyHashable: Any]? = (client as? IMKTextInput)?.attributes(forCharacterIndex: 0, lineHeightRectangle: &textFrame)
let useVerticalMode = (attributes?["IMKTextOrientation"] as? NSNumber)?.intValue == 0 || false