Class KeyInputController

  • All Implemented Interfaces:
    com.badlogic.gdx.InputProcessor

    public class KeyInputController
    extends com.badlogic.gdx.InputAdapter
    This input inputListener connects the input events with the key binding actions
    • Field Summary

      Fields 
      Modifier and Type Field Description
      KeyBindings mappings  
      static java.util.Set<java.lang.Integer> pressedKeys
      Holds the pressed keys at any moment
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean keyDown​(int keycode)  
      boolean keyUp​(int keycode)  
      • Methods inherited from class com.badlogic.gdx.InputAdapter

        keyTyped, mouseMoved, scrolled, touchDown, touchDragged, touchUp
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • pressedKeys

        public static java.util.Set<java.lang.Integer> pressedKeys
        Holds the pressed keys at any moment
    • Constructor Detail

      • KeyInputController

        public KeyInputController()
    • Method Detail

      • keyDown

        public boolean keyDown​(int keycode)
        Specified by:
        keyDown in interface com.badlogic.gdx.InputProcessor
        Overrides:
        keyDown in class com.badlogic.gdx.InputAdapter
      • keyUp

        public boolean keyUp​(int keycode)
        Specified by:
        keyUp in interface com.badlogic.gdx.InputProcessor
        Overrides:
        keyUp in class com.badlogic.gdx.InputAdapter