mirror of
https://github.com/GTNewHorizons/lwjgl3ify.git
synced 2026-11-22 21:19:51 +00:00
Fix macOS cmd + <key> not sending <key> pressed
This commit is contained in:
1 parent
4cf597e9b3
commit
52cf53d480
1 file changed
+3
-1
@@ -169,7 +169,9 @@ public class Display {
|
||||
cancelNextChar = false;
|
||||
if (key > GLFW_KEY_SPACE && key <= GLFW_KEY_GRAVE_ACCENT) { // Handle keys have a char. Exclude space to
|
||||
// avoid extra input when switching IME
|
||||
if ((GLFW_MOD_CONTROL & mods) != 0 && (GLFW_MOD_ALT & mods) == 0) { // Handle ctrl + x/c/v.
|
||||
if ((GLFW_MOD_SUPER & mods) != 0) {
|
||||
Keyboard.addGlfwKeyEvent(window, key, scancode, action, mods, (char) key);
|
||||
} else if ((GLFW_MOD_CONTROL & mods) != 0 && (GLFW_MOD_ALT & 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
|
||||
|
||||
Reference in new issue
Block a user