fixed Backspace in Termux
This commit is contained in:
parent
f69cdc8d9b
commit
d9b620790b
2 changed files with 3 additions and 2 deletions
|
|
@ -93,7 +93,7 @@ public abstract class TypingHandler extends KeyPadHandler {
|
||||||
// 2. Allow the assigned key to function normally, when there is no text (e.g. "Back" navigates back)
|
// 2. Allow the assigned key to function normally, when there is no text (e.g. "Back" navigates back)
|
||||||
// 3. Some app may need special treatment, so let it be.
|
// 3. Some app may need special treatment, so let it be.
|
||||||
boolean noTextBeforeCursor = textField.getStringBeforeCursor(1).isEmpty();
|
boolean noTextBeforeCursor = textField.getStringBeforeCursor(1).isEmpty();
|
||||||
if (mInputMode.isPassthrough() || noTextBeforeCursor || appHacks.onBackspace(mInputMode)) {
|
if (mInputMode.isPassthrough() || appHacks.onBackspace(mInputMode) || noTextBeforeCursor) {
|
||||||
Logger.d("onBackspace", "backspace ignored");
|
Logger.d("onBackspace", "backspace ignored");
|
||||||
mInputMode.reset();
|
mInputMode.reset();
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,8 @@ public class AppHacks {
|
||||||
if (isKindleInvertedTextField()) {
|
if (isKindleInvertedTextField()) {
|
||||||
inputMode.clearWordStem();
|
inputMode.clearWordStem();
|
||||||
} else if (isTermux()) {
|
} else if (isTermux()) {
|
||||||
return settings.getKeyBackspace() != KeyEvent.KEYCODE_BACK;
|
sendDownUpKeyEvents(KeyEvent.KEYCODE_DEL);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue