Cancel candidate by Bksp or Del when Plain Bopomofo

Fixes #152
This commit is contained in:
Lukhnos Liu 2020-10-17 06:19:47 -07:00
parent a71b354908
commit 4c8270c42f
1 changed files with 6 additions and 1 deletions

View File

@ -989,7 +989,12 @@ public:
}
}
if (charCode == 27) {
BOOL cancelCandidateKey =
(charCode == 27) ||
((_inputMode == kPlainBopomofoModeIdentifier) &&
(charCode == 8 || keyCode == kDeleteKeyCode));
if (cancelCandidateKey) {
gCurrentCandidateController.visible = NO;
[_candidates removeAllObjects];