mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-08 07:37:41 +00:00
make arrow keys repeatable (#932)
only applies to keyboard keys, not in toolbar
This commit is contained in:
parent
74571a3202
commit
a92d108444
4 changed files with 24 additions and 7 deletions
|
@ -1731,9 +1731,16 @@ public class LatinIME extends InputMethodService implements
|
|||
return;
|
||||
}
|
||||
if (repeatCount > 0) {
|
||||
if (code == KeyCode.DELETE && !mInputLogic.mConnection.canDeleteCharacters()) {
|
||||
// No need to feedback when repeat delete key will have no effect.
|
||||
return;
|
||||
// No need to feedback when repeat delete/cursor keys will have no effect.
|
||||
switch (code) {
|
||||
case KeyCode.DELETE, KeyCode.ARROW_LEFT, KeyCode.ARROW_UP:
|
||||
if (!mInputLogic.mConnection.canDeleteCharacters())
|
||||
return;
|
||||
break;
|
||||
case KeyCode.ARROW_RIGHT, KeyCode.ARROW_DOWN:
|
||||
if (!mInputLogic.mConnection.canForwardDeleteCharacters())
|
||||
return;
|
||||
break;
|
||||
}
|
||||
// TODO: Use event time that the last feedback has been generated instead of relying on
|
||||
// a repeat count to thin out feedback.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue