KeyHandler // Use (Shift+)Tab Key to handle candidates.

This commit is contained in:
ShikiSuen 2022-02-23 14:05:31 +08:00
parent d8300ab3ff
commit 1a4e0284a7
1 changed files with 14 additions and 0 deletions

View File

@ -1024,6 +1024,20 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
return YES;
}
if ([input isTab]) {
BOOL updated =
Preferences.specifyTabKeyBehavior?
([input isShiftHold] ? [gCurrentCandidateController showPreviousPage] : [gCurrentCandidateController showNextPage])
:
([input isShiftHold] ? [gCurrentCandidateController highlightPreviousCandidate] : [gCurrentCandidateController highlightNextCandidate])
;
if (!updated) {
[self errorCallbackConsolePrint:@"9B691919"];
errorCallback();
}
return YES;
}
if ([input isSpace] || [input isPageDown] || input.emacsKey == vChewingEmacsKeyNextPage) {
BOOL updated = [gCurrentCandidateController showNextPage];
if (!updated) {