SessionCtl // Remove rencentKeyHandledByInputHandlerEtc.

This commit is contained in:
ShikiSuen 2023-01-24 17:47:34 +08:00
parent e49d60447c
commit fde7a7a42a
2 changed files with 3 additions and 13 deletions

View File

@ -90,9 +90,6 @@ public class SessionCtl: IMKInputController {
public static var theShiftKeyDetector = ShiftKeyUpChecker( public static var theShiftKeyDetector = ShiftKeyUpChecker(
useLShift: PrefMgr.shared.togglingAlphanumericalModeWithLShift) useLShift: PrefMgr.shared.togglingAlphanumericalModeWithLShift)
/// `handle(event:)` Shift
public var rencentKeyHandledByInputHandlerEtc = false
/// ///
public static var isVerticalTyping: Bool = false public static var isVerticalTyping: Bool = false
public var isVerticalTyping: Bool = false { public var isVerticalTyping: Bool = false {

View File

@ -72,15 +72,9 @@ extension SessionCtl {
// Shift macOS 10.15 macOS // Shift macOS 10.15 macOS
// event event var Shift // event event var Shift
if #available(macOS 10.15, *) { if Self.theShiftKeyDetector.check(event), !PrefMgr.shared.disableShiftTogglingAlphanumericalMode {
if Self.theShiftKeyDetector.check(event), !PrefMgr.shared.disableShiftTogglingAlphanumericalMode { toggleAlphanumericalMode()
if !rencentKeyHandledByInputHandlerEtc { return true
toggleAlphanumericalMode()
} else {
rencentKeyHandledByInputHandlerEtc = false
}
return true
}
} }
// JIS // JIS
@ -150,7 +144,6 @@ extension SessionCtl {
/// commonEventHandler /// commonEventHandler
let result = inputHandler.handleEvent(eventToDeal) let result = inputHandler.handleEvent(eventToDeal)
rencentKeyHandledByInputHandlerEtc = result
if !result { if !result {
// .ofMarking // .ofMarking
if [.ofEmpty].contains(state.type) { tooltipInstance.hide() } if [.ofEmpty].contains(state.type) { tooltipInstance.hide() }