Class KeyboardInputController

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

    public class KeyboardInputController
    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  
      java.util.Set<java.lang.Integer> pressedKeys
      Holds the pressed keys at any moment
    • Constructor Summary

      Constructors 
      Constructor Description
      KeyboardInputController​(com.badlogic.gdx.Input input)  
    • 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 java.util.Set<java.lang.Integer> pressedKeys
        Holds the pressed keys at any moment
    • Constructor Detail

      • KeyboardInputController

        public KeyboardInputController​(com.badlogic.gdx.Input input)
    • 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