From 72560e82e25fc763537b90861c11b60bc255cb4a Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 24 Jan 2023 17:26:43 +0800 Subject: [PATCH] SessionCtl // Allow JIS_EiSu key to toggle Alphanumerical mode. --- Source/Modules/SessionCtl_HandleEvent.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/Modules/SessionCtl_HandleEvent.swift b/Source/Modules/SessionCtl_HandleEvent.swift index a276ebb3..49dccfae 100644 --- a/Source/Modules/SessionCtl_HandleEvent.swift +++ b/Source/Modules/SessionCtl_HandleEvent.swift @@ -93,6 +93,14 @@ extension SessionCtl { } } + // 用 JIS 鍵盤的英數切換鍵來切換中英文模式。 + if event.type == .keyDown { + if event.isJISAlphanumericalKey { + toggleAlphanumericalMode() + return true // Adobe Photoshop 相容:對 JIS 英數切換鍵傳入事件一律立刻返回 true。 + } + } + // MARK: 針對客體的具體處理 // 不再讓威注音處理由 Shift 切換到的英文模式的按鍵輸入。