KeyHandler // Bind alsoConfirmAssociatedCandidatesByEnter.

This commit is contained in:
ShikiSuen 2022-07-25 13:17:09 +08:00
parent 2f7e5a23e9
commit df55f0ddb7
1 changed files with 5 additions and 0 deletions

View File

@ -78,6 +78,11 @@ extension KeyHandler {
// MARK: Enter
if input.isEnter {
if state is InputState.AssociatedPhrases, !mgrPrefs.alsoConfirmAssociatedCandidatesByEnter {
clear()
stateCallback(InputState.EmptyIgnoringPreviousState())
return true
}
delegate?.keyHandler(
self,
didSelectCandidateAt: ctlCandidateCurrent.selectedCandidateIndex,