mgrPrefs // Add fixOddPreferences() for activateServer().
This commit is contained in:
parent
298c1425be
commit
952eec1215
|
@ -111,10 +111,7 @@ class ctlInputMethod: IMKInputController {
|
||||||
keyHandler.clear() // 這句不要砍,因為後面 handle State.Empty() 不一定執行。
|
keyHandler.clear() // 這句不要砍,因為後面 handle State.Empty() 不一定執行。
|
||||||
keyHandler.ensureParser()
|
keyHandler.ensureParser()
|
||||||
|
|
||||||
if #available(macOS 10.13, *) {
|
mgrPrefs.fixOddPreferences()
|
||||||
} else {
|
|
||||||
mgrPrefs.useIMKCandidateWindow = false // 防呆。macOS 10.11 用 IMK 選字窗會崩潰。
|
|
||||||
}
|
|
||||||
|
|
||||||
if isASCIIMode {
|
if isASCIIMode {
|
||||||
if mgrPrefs.disableShiftTogglingAlphanumericalMode {
|
if mgrPrefs.disableShiftTogglingAlphanumericalMode {
|
||||||
|
|
|
@ -664,6 +664,21 @@ public enum mgrPrefs {
|
||||||
static var usingHotKeyCurrencyNumerals: Bool
|
static var usingHotKeyCurrencyNumerals: Bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: Auto parameter fix procedures, executed everytime on ctlInputMethod.activateServer().
|
||||||
|
|
||||||
|
extension mgrPrefs {
|
||||||
|
static func fixOddPreferences() {
|
||||||
|
// 防呆。macOS 10.11 用 IMK 選字窗會崩潰。
|
||||||
|
if #unavailable(macOS 10.13) { mgrPrefs.useIMKCandidateWindow = false }
|
||||||
|
if #unavailable(macOS 10.15) {
|
||||||
|
handleDefaultCandidateFontsByLangIdentifier = false
|
||||||
|
shouldAlwaysUseShiftKeyAccommodation = false
|
||||||
|
disableShiftTogglingAlphanumericalMode = false
|
||||||
|
togglingAlphanumericalModeWithLShift = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// MARK: Snapshot Extension
|
// MARK: Snapshot Extension
|
||||||
|
|
||||||
var snapshot: [String: Any]?
|
var snapshot: [String: Any]?
|
||||||
|
|
Loading…
Reference in New Issue