Class Keyboard

java.lang.Object
buildengine.engine.input.Keyboard
All Implemented Interfaces:
KeyListener, EventListener

public class Keyboard extends Object implements KeyListener
All keyboard handling.
See Also:
  • Constructor Details

    • Keyboard

      public Keyboard()
  • Method Details

    • init

      public void init()
    • pollEvents

      public void pollEvents()
    • reset

      public void reset()
    • isClicked

      public boolean isClicked(int key, ClickType type)
      Checks if a key is currently being clicked in any form.
      Parameters:
      key - The keycode of the key that's possibly being clicked.
      type - The action of the click. For example ClickType.HOLD
      Returns:
      If the key is being pressed or not.
    • isHold

      public boolean isHold(int key)
    • isPressed

      public boolean isPressed(int key)
    • isReleased

      public boolean isReleased(int key)
    • isAltDown

      public boolean isAltDown()
    • isShiftDown

      public boolean isShiftDown()
    • isControlDown

      public boolean isControlDown()
    • keyTyped

      public void keyTyped(KeyEvent e)
      Specified by:
      keyTyped in interface KeyListener
    • keyPressed

      public void keyPressed(KeyEvent e)
      Specified by:
      keyPressed in interface KeyListener
    • keyReleased

      public void keyReleased(KeyEvent e)
      Specified by:
      keyReleased in interface KeyListener