mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-10-20 07:24:42 +00:00
Add support for newer keycodes from Android 15 and 16
This commit is contained in:
@@ -34,6 +34,7 @@ public class KeyboardTranslator implements InputManager.InputDeviceListener {
|
||||
public static final int VK_EQUALS = 61;
|
||||
public static final int VK_ESCAPE = 27;
|
||||
public static final int VK_F1 = 112;
|
||||
public static final int VK_F13 = 0x7C;
|
||||
public static final int VK_END = 35;
|
||||
public static final int VK_HOME = 36;
|
||||
public static final int VK_NUM_LOCK = 144;
|
||||
@@ -161,6 +162,10 @@ public class KeyboardTranslator implements InputManager.InputDeviceListener {
|
||||
keycode <= KeyEvent.KEYCODE_F12) {
|
||||
translated = (keycode - KeyEvent.KEYCODE_F1) + VK_F1;
|
||||
}
|
||||
else if (keycode >= KeyEvent.KEYCODE_F13 &&
|
||||
keycode <= KeyEvent.KEYCODE_F24) {
|
||||
translated = (keycode - KeyEvent.KEYCODE_F13) + VK_F13;
|
||||
}
|
||||
else {
|
||||
switch (keycode) {
|
||||
case KeyEvent.KEYCODE_ALT_LEFT:
|
||||
@@ -349,6 +354,14 @@ public class KeyboardTranslator implements InputManager.InputDeviceListener {
|
||||
translated = 0x6E;
|
||||
break;
|
||||
|
||||
case KeyEvent.KEYCODE_PRINT:
|
||||
translated = 0x2A;
|
||||
break;
|
||||
|
||||
case KeyEvent.KEYCODE_SCREENSHOT:
|
||||
translated = 0x2C;
|
||||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user