Skip to content

Commit

Permalink
Synthesize ASCII escape codes for ctrl+alt+CHAR inputs too (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenraven authored Sep 23, 2023
1 parent be28e27 commit f06ec1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/lwjglx/opengl/Display.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void invoke(long window, int key, int scancode, int action, int mods) {
// MacOS doesn't send a char event for Cmd+KEY presses, but other platforms do.
cancelNextChar = true;
}
} else if ((GLFW_MOD_CONTROL & mods) != 0 && (GLFW_MOD_ALT & mods) == 0) { // Handle ctrl + x/c/v.
} else if ((GLFW_MOD_CONTROL & mods) != 0) { // Handle ctrl + x/c/v.
Keyboard.addGlfwKeyEvent(window, key, scancode, action, mods, (char) (key & 0x1f));
cancelNextChar = true; // Cancel char event from ctrl key since its already handled here
} else if (action > 0) { // Delay press and repeat key event to actual char input. There is ALWAYS a
Expand Down

0 comments on commit f06ec1e

Please sign in to comment.