Skip to content

Commit

Permalink
thing
Browse files Browse the repository at this point in the history
  • Loading branch information
GiantLuigi4 committed Jun 14, 2023
1 parent c77db46 commit 0521a61
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/main/java/org/cef/browser/CefBrowserOsr.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,19 +241,18 @@ public static int getChar(int keyCode, int scanCode, int mod) {
case GLFW_KEY_END:
return '\uFFFF';
}
String keystr = GLFW.glfwGetKeyName(keyCode, scanCode);
if (keystr == null) {
keystr = "\0";
} else if (keystr.length() == 0) {
return -1;
}
// if((mod & GLFW_MOD_SHIFT) != 0) {
// keystr = keystr.toUpperCase(Locale.ROOT);
// if (scanCode != -1) {
// String keystr = GLFW.glfwGetKeyName(keyCode, scanCode);
// if (keystr == null) {
// return (int) '\0';
// } else if (keystr.length() == 0) {
// return -1;
// }
// }
return keyCode;
}

private long mapScanCode(int key, char c) {
private static long mapScanCode(int key, char c) {
if (key == GLFW_KEY_LEFT_CONTROL || key == GLFW_KEY_RIGHT_CONTROL) return 29;
return switch (key) {
case GLFW_KEY_DELETE -> 83;
Expand Down

0 comments on commit 0521a61

Please sign in to comment.