Repo // Tweak alsoConfirmAssociatedCandidatesByEnter().
This commit is contained in:
parent
beed28efe8
commit
5b58442d67
|
@ -102,7 +102,7 @@ extension InputHandler {
|
|||
if let keyCodeType = KeyCode(rawValue: input.keyCode) {
|
||||
switch keyCodeType {
|
||||
case .kLineFeed, .kCarriageReturn:
|
||||
if state.type == .ofAssociates, !prefs.alsoConfirmAssociatedCandidatesByEnter {
|
||||
if state.type == .ofAssociates, !(input.isShiftHold || prefs.alsoConfirmAssociatedCandidatesByEnter) {
|
||||
delegate.switchState(IMEState.ofAbortion())
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ public class PrefMgr: PrefMgrProtocol {
|
|||
@AppProperty(key: UserDef.kAutoCorrectReadingCombination.rawValue, defaultValue: true)
|
||||
public var autoCorrectReadingCombination: Bool
|
||||
|
||||
@AppProperty(key: UserDef.kAlsoConfirmAssociatedCandidatesByEnter.rawValue, defaultValue: true)
|
||||
@AppProperty(key: UserDef.kAlsoConfirmAssociatedCandidatesByEnter.rawValue, defaultValue: false)
|
||||
public var alsoConfirmAssociatedCandidatesByEnter: Bool
|
||||
|
||||
@AppProperty(key: UserDef.kKeepReadingUponCompositionError.rawValue, defaultValue: false)
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
// marks, or product names of Contributor, except as required to fulfill notice
|
||||
// requirements defined in MIT License.
|
||||
|
||||
import AppKit
|
||||
import Foundation
|
||||
import Shared
|
||||
import Tekkon
|
||||
|
@ -99,7 +100,8 @@ public extension SessionCtl {
|
|||
let candidateString: String = candidateString?.string ?? ""
|
||||
if state.type == .ofAssociates {
|
||||
// 聯想詞的 Shift+選字鍵的處理已經在其它位置實作完成。
|
||||
if !PrefMgr.shared.alsoConfirmAssociatedCandidatesByEnter {
|
||||
let isShiftHold = NSEvent.modifierFlags.contains(.shift)
|
||||
if !(isShiftHold || PrefMgr.shared.alsoConfirmAssociatedCandidatesByEnter) {
|
||||
switchState(IMEState.ofAbortion())
|
||||
return
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ struct VwrPrefPaneBehavior: View {
|
|||
@Backport.AppStorage(wrappedValue: true, UserDef.kUseSpaceToCommitHighlightedSCPCCandidate.rawValue)
|
||||
private var useSpaceToCommitHighlightedSCPCCandidate: Bool
|
||||
|
||||
@Backport.AppStorage(wrappedValue: true, UserDef.kAlsoConfirmAssociatedCandidatesByEnter.rawValue)
|
||||
@Backport.AppStorage(wrappedValue: false, UserDef.kAlsoConfirmAssociatedCandidatesByEnter.rawValue)
|
||||
private var alsoConfirmAssociatedCandidatesByEnter: Bool
|
||||
|
||||
@Backport.AppStorage(wrappedValue: true, UserDef.kTogglingAlphanumericalModeWithLShift.rawValue)
|
||||
|
|
Loading…
Reference in New Issue