Reset // PgUp & PgDn to call Candidate Window.

This commit is contained in:
ShikiSuen 2022-02-06 23:47:05 +08:00
parent f22abcad40
commit bf670c3483
1 changed files with 7 additions and 5 deletions

View File

@ -376,11 +376,13 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
return YES; return YES;
} }
// MARK: Space and Down // MARK: Space and Down
// keyCode 125 = Down, charCode 32 = Space // keyCode 125 = Down, charCode 32 = Space
if (_bpmfReadingBuffer->isEmpty() && if (_bpmfReadingBuffer->isEmpty() &&
[state isKindOfClass:[InputStateNotEmpty class]] && [state isKindOfClass:[InputStateNotEmpty class]] &&
([input isExtraChooseCandidateKey] || charCode == 32 || (input.useVerticalMode && ([input isVerticalModeOnlyChooseCandidateKey])))) { ([input isExtraChooseCandidateKey] || charCode == 32
|| [input isPageDown] || [input isPageUp]
|| (input.useVerticalMode && ([input isVerticalModeOnlyChooseCandidateKey])))) {
if (charCode == 32) { if (charCode == 32) {
// if the spacebar is NOT set to be a selection key // if the spacebar is NOT set to be a selection key
if ([input isShiftHold] || !Preferences.chooseCandidateUsingSpace) { if ([input isShiftHold] || !Preferences.chooseCandidateUsingSpace) {