mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-04 17:55:36 +08:00
- in onKeyDown() ignore keys when the Fn key is pressed
- in onKeyDown() return false when the key is not handled. The above two changes fix the handling of Fn-key combo's on devices with a physical keyboard, allowing the android system defined fallbacks from `/system/usr/keychars/Generic.kcm` to be properly handled. Fixes #731. Original diagnosis and fix by Konehaltia.
This commit is contained in:
committed by
Fredrik Fornwall
parent
fdae272214
commit
365f9723cc
@@ -600,7 +600,7 @@ public final class TerminalView extends View {
|
||||
if (controlDownFromEvent) keyMod |= KeyHandler.KEYMOD_CTRL;
|
||||
if (event.isAltPressed()) keyMod |= KeyHandler.KEYMOD_ALT;
|
||||
if (event.isShiftPressed()) keyMod |= KeyHandler.KEYMOD_SHIFT;
|
||||
if (handleKeyCode(keyCode, keyMod)) {
|
||||
if (!event.isFunctionPressed() && handleKeyCode(keyCode, keyMod)) {
|
||||
if (LOG_KEY_EVENTS) Log.i(EmulatorDebug.LOG_TAG, "handleKeyCode() took key event");
|
||||
return true;
|
||||
}
|
||||
@@ -619,7 +619,7 @@ public final class TerminalView extends View {
|
||||
if (LOG_KEY_EVENTS)
|
||||
Log.i(EmulatorDebug.LOG_TAG, "KeyEvent#getUnicodeChar(" + effectiveMetaState + ") returned: " + result);
|
||||
if (result == 0) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
int oldCombiningAccent = mCombiningAccent;
|
||||
|
Reference in New Issue
Block a user