diff --git a/Source/Modules/IMEModules/PreferencesModule.swift b/Source/Modules/IMEModules/PreferencesModule.swift index ff67acb3..68d2cf45 100644 --- a/Source/Modules/IMEModules/PreferencesModule.swift +++ b/Source/Modules/IMEModules/PreferencesModule.swift @@ -38,6 +38,7 @@ private let kShiftJISShinjitaiOutputEnabled = "ShiftJISShinjitaiOutputEnabled" private let kHalfWidthPunctuationEnabled = "HalfWidthPunctuationEnable" private let kMoveCursorAfterSelectingCandidate = "MoveCursorAfterSelectingCandidate" private let kEscToCleanInputBuffer = "EscToCleanInputBuffer" +private let kSpecifyTabKeyBehavior = "SpecifyTabKeyBehavior" private let kUseSCPCTypingMode = "UseSCPCTypingMode" private let kMaxCandidateLength = "MaxCandidateLength" private let kShouldNotFartInLieuOfBeep = "ShouldNotFartInLieuOfBeep" @@ -227,6 +228,7 @@ struct ComposingBufferSize { kChineseConversionEnabled, kShiftJISShinjitaiOutputEnabled, kHalfWidthPunctuationEnabled, + kSpecifyTabKeyBehavior, kEscToCleanInputBuffer, kCandidateTextFontName, kCandidateKeyLabelFontName, @@ -269,6 +271,11 @@ struct ComposingBufferSize { UserDefaults.standard.set(Preferences.shouldAutoReloadUserDataFiles, forKey: kShouldAutoReloadUserDataFiles) } + // 預設情況下讓 Tab 鍵在選字窗內切換候選字、而不是用來換頁。 + if UserDefaults.standard.object(forKey: kSpecifyTabKeyBehavior) == nil { + UserDefaults.standard.set(Preferences.specifyTabKeyBehavior, forKey: kSpecifyTabKeyBehavior) + } + // 預設禁用逐字選字模式(就是每個字都要選的那種),所以設成 false if UserDefaults.standard.object(forKey: kUseSCPCTypingMode) == nil { UserDefaults.standard.set(Preferences.useSCPCTypingMode, forKey: kUseSCPCTypingMode) @@ -428,7 +435,10 @@ struct ComposingBufferSize { @UserDefault(key: kEscToCleanInputBuffer, defaultValue: true) @objc static var escToCleanInputBuffer: Bool - // MARK: Optional settings + @UserDefault(key: kSpecifyTabKeyBehavior, defaultValue: false) + @objc static var specifyTabKeyBehavior: Bool + + // MARK: - Optional settings @UserDefault(key: kCandidateTextFontName, defaultValue: nil) @objc static var candidateTextFontName: String? diff --git a/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index e4395504..8cf4f8fd 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -332,17 +332,17 @@ - + - + - + - + @@ -354,7 +354,7 @@ - + @@ -373,7 +373,7 @@ - + @@ -381,7 +381,7 @@ - + @@ -392,9 +392,9 @@ - + - + @@ -416,25 +416,10 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + - - - + + + + - - - + + + - - - + - - + + - + - + - - - - - - - - - - - - - + - - - + - + diff --git a/Source/WindowNIBs/Source/WindowNIBs/en.lproj/frmPrefWindow.strings b/Source/WindowNIBs/Source/WindowNIBs/en.lproj/frmPrefWindow.strings index dd51ecfe..8e72240f 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/en.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/Source/WindowNIBs/en.lproj/frmPrefWindow.strings @@ -173,9 +173,6 @@ /* Class = "NSTextFieldCell"; title = "Change UI font size of candidate window for a better visual clarity."; ObjectID = "iRg-wx-Nx2"; */ "iRg-wx-Nx2.title" = "Change UI font size of candidate window for a better visual clarity."; -/* Class = "NSTextFieldCell"; title = "Define your preferred action when user data files reload."; ObjectID = "j48-5a-cEs"; */ -"j48-5a-cEs.title" = "Define your preferred action when user data files reload."; - /* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[0] = "Item 1"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[0]" = "Item 1"; diff --git a/Source/WindowNIBs/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings b/Source/WindowNIBs/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings index f12b05c8..859f850c 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings @@ -173,9 +173,6 @@ /* Class = "NSTextFieldCell"; title = "Change UI font size of candidate window for a better visual clarity."; ObjectID = "iRg-wx-Nx2"; */ "iRg-wx-Nx2.title" = "入力候補陣列の候補文字の字号をご指定ください。"; -/* Class = "NSTextFieldCell"; title = "Define your preferred action when user data files reload."; ObjectID = "j48-5a-cEs"; */ -"j48-5a-cEs.title" = "ユーザー辞書データの読み込む時のやることをご指示ください。"; - /* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[0] = "Item 1"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[0]" = "Item 1"; diff --git a/Source/WindowNIBs/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings b/Source/WindowNIBs/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings index c3454a60..c2a38827 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings @@ -173,9 +173,6 @@ /* Class = "NSTextFieldCell"; title = "Change UI font size of candidate window for a better visual clarity."; ObjectID = "iRg-wx-Nx2"; */ "iRg-wx-Nx2.title" = "变更候选字窗的字型大小。"; -/* Class = "NSTextFieldCell"; title = "Define your preferred action when user data files reload."; ObjectID = "j48-5a-cEs"; */ -"j48-5a-cEs.title" = "请指定在使用者资料重载时要启用的功能。"; - /* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[0] = "Item 1"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[0]" = "Item 1"; diff --git a/Source/WindowNIBs/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings b/Source/WindowNIBs/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings index 0b5f090d..7032b8c9 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings @@ -173,9 +173,6 @@ /* Class = "NSTextFieldCell"; title = "Change UI font size of candidate window for a better visual clarity."; ObjectID = "iRg-wx-Nx2"; */ "iRg-wx-Nx2.title" = "變更候選字窗的字型大小。"; -/* Class = "NSTextFieldCell"; title = "Define your preferred action when user data files reload."; ObjectID = "j48-5a-cEs"; */ -"j48-5a-cEs.title" = "請指定在使用者數據重載時要啟用的功能。"; - /* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[0] = "Item 1"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[0]" = "Item 1";