Package engine.tools

Class Keyboard

java.lang.Object
org.lwjgl.system.Callback
org.lwjgl.glfw.GLFWKeyCallback
engine.tools.Keyboard
All Implemented Interfaces:
AutoCloseable, org.lwjgl.glfw.GLFWKeyCallbackI, org.lwjgl.system.CallbackI, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class Keyboard extends org.lwjgl.glfw.GLFWKeyCallback
Keyboard class to detect when a key is pressed. Uses the GLFWKeyCallBack to detect.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

    org.lwjgl.system.Pointer.Default
  • Field Summary

    Fields inherited from interface org.lwjgl.glfw.GLFWKeyCallbackI

    CIF

    Fields inherited from interface org.lwjgl.system.Pointer

    BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    invoke(long window, int key, int scancode, int action, int mods)
     
    static boolean
    isKeyDown(int keycode)
    Returns whether a key has been pressed.

    Methods inherited from class org.lwjgl.glfw.GLFWKeyCallback

    create, create, createSafe, set

    Methods inherited from class org.lwjgl.system.Callback

    address, equals, free, free, get, getSafe, hashCode, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.CallbackI

    address

    Methods inherited from interface org.lwjgl.glfw.GLFWKeyCallbackI

    callback, getCallInterface

    Methods inherited from interface org.lwjgl.system.NativeResource

    close
  • Constructor Details

    • Keyboard

      public Keyboard()
  • Method Details

    • invoke

      public void invoke(long window, int key, int scancode, int action, int mods)
    • isKeyDown

      public static boolean isKeyDown(int keycode)
      Returns whether a key has been pressed.
      Parameters:
      keycode -
      Returns: