fix: in onKeyDown() ignore keys when the Fn key is pressed

This commit is contained in:
imkiva 2018-09-10 23:05:19 +08:00
parent fc2b3f33a6
commit 98ec7ce15e
No known key found for this signature in database
GPG Key ID: A0A40A816B1689AA

View File

@ -745,7 +745,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;
}
@ -764,7 +764,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;