LWJGL3 - Mouse + Keyboard

Started by abcdef, November 27, 2014, 19:03:56

Previous topic - Next topic

abcdef

Some more small questions (I checked out the examples on github but couldn't see anything to help here)

1) Is there an equivalent to Mouse.setGrabbed(true)?

2) I couldn't see an equivalent key for "~" (Tilda), the GLFW documentation doesn't have this either. Is there a plan to emulate some of the missing keys?

3) I couldn't see Keyboard.enableRepeatEvents(boolean) either, would I need to emulate this?

spasi

Quote from: abcdef on November 27, 2014, 19:03:561) Is there an equivalent to Mouse.setGrabbed(true)?

glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);


Quote from: abcdef on November 27, 2014, 19:03:562) I couldn't see an equivalent key for "~" (Tilda), the GLFW documentation doesn't have this either. Is there a plan to emulate some of the missing keys?

It's GLFW_KEY_GRAVE_ACCENT.

Quote from: abcdef on November 27, 2014, 19:03:563) I couldn't see Keyboard.enableRepeatEvents(boolean) either, would I need to emulate this?

You don't need to enable it, you'll automatically get repeat key events with a GLFW_REPEAT action. You can choose to use it or ignore it.