diff --git a/Packages/vChewing_CocoaExtension/Sources/CocoaExtension/CocoaExtension_NSEvent.swift b/Packages/vChewing_CocoaExtension/Sources/CocoaExtension/CocoaExtension_NSEvent.swift index 2193293c..a9c92757 100644 --- a/Packages/vChewing_CocoaExtension/Sources/CocoaExtension/CocoaExtension_NSEvent.swift +++ b/Packages/vChewing_CocoaExtension/Sources/CocoaExtension/CocoaExtension_NSEvent.swift @@ -311,7 +311,7 @@ public enum EmacsKey { // MARK: - Apple ABC Keyboard Mapping public extension NSEvent { - func layoutTranslated(to layout: LatinKeyboardMarkings = .qwerty) -> NSEvent { + func layoutTranslated(to layout: LatinKeyboardMappings = .qwerty) -> NSEvent { let mapTable = layout.mapTable if type == .flagsChanged { return self } guard modifierFlags == .shift || modifierFlags.isEmpty else { return self } diff --git a/Packages/vChewing_IMKUtils/Sources/IMKUtils/LatinKeyboardMappings.swift b/Packages/vChewing_IMKUtils/Sources/IMKUtils/LatinKeyboardMappings.swift index 79b59112..1e881091 100644 --- a/Packages/vChewing_IMKUtils/Sources/IMKUtils/LatinKeyboardMappings.swift +++ b/Packages/vChewing_IMKUtils/Sources/IMKUtils/LatinKeyboardMappings.swift @@ -8,7 +8,7 @@ import Foundation -public enum LatinKeyboardMarkings: String { +public enum LatinKeyboardMappings: String { case qwerty = "com.apple.keylayout.ABC" case qwertyUS = "com.apple.keylayout.US" case azerty = "com.apple.keylayout.ABC-AZERTY" diff --git a/Source/Modules/SessionCtl_HandleEvent.swift b/Source/Modules/SessionCtl_HandleEvent.swift index 23d6184a..600ab735 100644 --- a/Source/Modules/SessionCtl_HandleEvent.swift +++ b/Source/Modules/SessionCtl_HandleEvent.swift @@ -124,7 +124,7 @@ public extension SessionCtl { // 在啟用注音排列而非拼音輸入的情況下,強制將當前鍵盤佈局翻譯為美規鍵盤(或指定的其它鍵盤佈局)。 if !inputHandler.isComposerUsingPinyin || IMKHelper.isDynamicBasicKeyboardLayoutEnabled { - var defaultLayout = LatinKeyboardMarkings(rawValue: PrefMgr.shared.basicKeyboardLayout) ?? .qwerty + var defaultLayout = LatinKeyboardMappings(rawValue: PrefMgr.shared.basicKeyboardLayout) ?? .qwerty if let parser = KeyboardParser(rawValue: PrefMgr.shared.keyboardParser) { switch parser { case .ofStandard, .ofIBM, .ofSeigyou, .ofFakeSeigyou, .ofDachen26: defaultLayout = .qwerty