Preview 6.1

This commit is contained in:
khanhduytran0
2020-03-28 07:31:25 +07:00
parent 62df7b204f
commit 8dc1b841fc
442 changed files with 809 additions and 726 deletions

View File

@@ -117,22 +117,24 @@ public class AndroidLWJGLKeycode {
}
public static void execKey(MainActivity mainActivity, KeyEvent keyEvent, int i, boolean isDown) {
for (Map.Entry<Integer, Integer> perKey : androidToLwjglMap.entrySet()) {
try {
// Old method works without dead chars:
/*
if (isDown) {
mainActivity.sendKeyPress((char) keyEvent.getUnicodeChar());
}
*/
System.out.println("Sending key as char: " + ((char) keyEvent.getUnicodeChar()));
mainActivity.sendKeyPress(0, (char) keyEvent.getUnicodeChar(), isDown);
} catch (Throwable th) {
th.printStackTrace();
}
for (Map.Entry<Integer, Integer> perKey : androidToLwjglMap.entrySet()) {
if (perKey.getKey() == i) {
mainActivity.sendKeyPress(perKey.getValue(), isDown);
}
}
if (!AndroidDisplay.grab) {
try {
// Old method works without dead chars:
if (isDown) {
mainActivity.sendKeyPress((char) keyEvent.getUnicodeChar());
}
} catch (Throwable th) {
th.printStackTrace();
}
}
}
}