LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: delay at GLFWKeyCallback with invoke between GLFW_PRESS and GLFW_REPEAT.  (Read 3 times)

wartemw

  • Newbie
  • *
  • Offline Offline
  • Posts: 25

1)delay at GLFWKeyCallback with invoke between GLFW_PRESS and GLFW_REPEAT. fails to make GLFW_REPEAT.
Code: [Select]
public class Input extends GLFWKeyCallback {

    private boolean[] keys = new boolean[Character.MAX_VALUE];

    @Override
    public void invoke(long window, int key, int scancode, int action, int mods) {

        ????????????????????
        ????????????????????

    }
}
2) via input (60 update) also fails to make GLFW_PRESS.
Code: [Select]
public class Input extends GLFWKeyCallback {

    private boolean[] keys = new boolean[Character.MAX_VALUE];

    @Override
    public void invoke(long window, int key, int scancode, int action, int mods) {
        keys[key] = action != GLFW_RELEASE;
    }

    public boolean isKeyPress(int key) {
        return ????????????????????????????????????????????????????????????????????????????????????????????????????????????????;
    }

    public boolean isKeyRepeat(int key) {
        return keys[key];
    }


}

Logged