From 27ccac62d29f6333d9edc07931f7a434738cce49 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 15 Sep 2023 18:12:14 +0800 Subject: [PATCH] SessionCtl // Do something with non-JIS keyboard on activation. --- .../Sources/MainAssembly/SessionCtl_Core.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Packages/vChewing_MainAssembly/Sources/MainAssembly/SessionCtl_Core.swift b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SessionCtl_Core.swift index 3057e293..f8b55b0f 100644 --- a/Packages/vChewing_MainAssembly/Sources/MainAssembly/SessionCtl_Core.swift +++ b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SessionCtl_Core.swift @@ -322,6 +322,16 @@ public extension SessionCtl { Self.theShiftKeyDetector.toggleWithLShift = PrefMgr.shared.togglingAlphanumericalModeWithLShift Self.theShiftKeyDetector.toggleWithRShift = PrefMgr.shared.togglingAlphanumericalModeWithRShift + if isASCIIMode, !IMEApp.isKeyboardJIS { + if #available(macOS 10.15, *) { + if !Self.theShiftKeyDetector.enabled { + isASCIIMode = false + } + } else { + isASCIIMode = false + } + } + DispatchQueue.main.async { AppDelegate.shared.checkUpdate(forced: false) AppDelegate.shared.checkMemoryUsage()