KeyHandler // Pass Shift+FWD/BKW in Candidate window.
- Sometimes, a user may want to immediately mark phrases even if the IME is in the ChoosingCandidate state, and the IME farts / beeps. Now, these two hotkey combination cancel the current Candidate window, so the user doesn't need to press ESC / Delete / BackSpace.
This commit is contained in:
parent
8ada2b5dda
commit
eb04526fbb
|
@ -1002,7 +1002,8 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
|
||||||
UniChar charCode = input.charCode;
|
UniChar charCode = input.charCode;
|
||||||
VTCandidateController *gCurrentCandidateController = [self.delegate candidateControllerForKeyHandler:self];
|
VTCandidateController *gCurrentCandidateController = [self.delegate candidateControllerForKeyHandler:self];
|
||||||
|
|
||||||
BOOL cancelCandidateKey = [input isBackSpace] || [input isESC] || [input isDelete];
|
BOOL cancelCandidateKey = [input isBackSpace] || [input isESC] || [input isDelete]
|
||||||
|
|| (([input isCursorBackward] || [input isCursorForward]) && [input isShiftHold]);
|
||||||
|
|
||||||
if (cancelCandidateKey) {
|
if (cancelCandidateKey) {
|
||||||
if ([state isKindOfClass: [InputStateAssociatedPhrases class]]) {
|
if ([state isKindOfClass: [InputStateAssociatedPhrases class]]) {
|
||||||
|
|
Loading…
Reference in New Issue