Add Home/End key support in candidate panels.
This commit is contained in:
parent
1993942cd4
commit
b369106719
|
@ -605,6 +605,27 @@ enum {
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (keyCode == kHomeKeyCode) {
|
||||||
|
if (LTCurrentCandidateController.selectedCandidateIndex == 0) {
|
||||||
|
[self beep];
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
LTCurrentCandidateController.selectedCandidateIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
else if (keyCode == kEndKeyCode && [_candidates count] > 0) {
|
||||||
|
if (LTCurrentCandidateController.selectedCandidateIndex == [_candidates count] - 1) {
|
||||||
|
[self beep];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
LTCurrentCandidateController.selectedCandidateIndex = [_candidates count] - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
NSInteger index = NSNotFound;
|
NSInteger index = NSNotFound;
|
||||||
|
|
Loading…
Reference in New Issue