From 165727f43d75401a1eb90816219445bd3f973f57 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 9 Oct 2022 14:39:05 +0800 Subject: [PATCH] SessionCtl // Translate Apple dynamic keylayouts in new way. --- Source/Modules/SessionCtl_HandleEvent.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Modules/SessionCtl_HandleEvent.swift b/Source/Modules/SessionCtl_HandleEvent.swift index b6519ee6..66f4a59f 100644 --- a/Source/Modules/SessionCtl_HandleEvent.swift +++ b/Source/Modules/SessionCtl_HandleEvent.swift @@ -7,6 +7,7 @@ // requirements defined in MIT License. import CocoaExtension +import IMKUtils import InputMethodKit import NotifierUI import Shared @@ -108,6 +109,11 @@ extension SessionCtl { eventToDeal = eventToDeal.convertFromEmacsKeyEvent(isVerticalContext: verticalProcessing) } + // 翻譯 Apple 動態鍵盤佈局 + if IMKHelper.isDynamicBasicKeyboardLayoutEnabled { + eventToDeal = eventToDeal.inAppleABCStaticForm + } + // 準備修飾鍵,用來判定要新增的詞彙是否需要賦以非常低的權重。 Self.areWeNerfing = eventToDeal.modifierFlags.contains([.shift, .command])