-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There are some hotkeys that do not work when the cmd
key is specified (macOS)
#803
Comments
The issue here seems to be connected to the fact that while keeping pressed
If we keep a single key press, without modifer
Moreover, if I overwrite the public void key (long w, int key, int scancode, int action, int modifiers) {
switch (action) {
case GLFW_PRESS -> System.out.println("GLFW_PRESS");
case GLFW_RELEASE -> System.out.println("GLFW_RELEASE");
case GLFW_REPEAT -> System.out.println("GLFW_REPEAT");
}
} and run a basic example of JGLFW that just set the callback In editor repo if I keep pressed
In the basic JGLFW example if I keep pressed
The difference is that in the editor we have libgdx in the middle. |
Further debugging leads me here: badlogic/jglfw@6625d36 |
If we just keep the else branch of the commit above, we don't have this bug. In any case, when the code enters that if, it continuously generates GLFW_RELEASE events, this is why we have the strange behaviour showed above, that is:
rather than just GLFW_RELEASE. The bug that custom So, after that I'm confident in removing the if above and just leave the else branch because:
Or, if we want to keep the thing similar as possible, we could change the internal if like this:
|
Description:
There are some hotkeys that don't work properly when the
cmd
key is specified in the hotkey, as if the key had been pressed multiple times.--- General ---
Pan Drag
Zoom Drag
Pan Move
Zoom Move
--- Playback ---
Timeline Pan Drag
Timeline Pan Move
Timeline Frame Drag
Timeline Frame Move
Here is a video shows the issue:
https://github.com/EsotericSoftware/spine-editor/assets/85478846/a0284b08-fdd2-42c0-98a6-1678b728f91a
Also, although it will not behave as if the key has been pressed multiple times, the following hotkeys will no longer be recognized when
cmd
is specified.--- Tools ---
Last Tool
Here is a video shows the issue:
https://github.com/EsotericSoftware/spine-editor/assets/85478846/b3636e3e-9ab4-4b8f-b29a-3d14cb4fb6de
Expected behavior:
Even if you specify the
cmd
key, the hotkey will still be recognized normally.Steps to reproduce:
J
key in the viewport.Pan Drag: J
toPan Drag: cmd + J
.cmd + J
when the viewport is active. Then you will notice thatPan Drag
is no longer working.The version of Spine in which this problem was found:
Spine 4.2.29
The text was updated successfully, but these errors were encountered: