Class GlfwKeyInputVR

java.lang.Object
com.jme3.input.lwjgl.GlfwKeyInputVR
All Implemented Interfaces:
Input, KeyInput

public class GlfwKeyInputVR extends Object implements KeyInput
A key input that wraps GLFW underlying components.
  • Constructor Details

    • GlfwKeyInputVR

      public GlfwKeyInputVR(LwjglWindowVR context)
      Create a new input attached to the given context.
      Parameters:
      context - the context to attach to this input.
  • Method Details

    • initialize

      public void initialize()
      Description copied from interface: Input
      Initializes the native side to listen into events from the device.
      Specified by:
      initialize in interface Input
    • getKeyCount

      public int getKeyCount()
      Get the key count.
      Returns:
      the key count.
    • update

      public void update()
      Description copied from interface: Input
      Queries the device for input. All events should be sent to the RawInputListener set with setInputListener.
      Specified by:
      update in interface Input
      See Also:
    • destroy

      public void destroy()
      Description copied from interface: Input
      Ceases listening to events from the device.
      Specified by:
      destroy in interface Input
    • isInitialized

      public boolean isInitialized()
      Specified by:
      isInitialized in interface Input
      Returns:
      True if the device has been initialized and not destroyed.
      See Also:
    • setInputListener

      public void setInputListener(RawInputListener listener)
      Description copied from interface: Input
      Sets the input listener to receive events from this device. The appropriate events should be dispatched through the callbacks in RawInputListener.
      Specified by:
      setInputListener in interface Input
      Parameters:
      listener - the desired listener
    • getInputTimeNanos

      public long getInputTimeNanos()
      Specified by:
      getInputTimeNanos in interface Input
      Returns:
      The current absolute time as nanoseconds. This time is expected to be relative to the time given in InputEvents time property.
    • getKeyName

      public String getKeyName(int jmeKey)
      Description copied from interface: KeyInput
      Determine the name of the specified key in the current system language.
      Specified by:
      getKeyName in interface KeyInput
      Parameters:
      jmeKey - The keycode from KeyInput
      Returns:
      the name of the key