Package buildengine.engine.input
Class Keyboard
java.lang.Object
buildengine.engine.input.Keyboard
- All Implemented Interfaces:
KeyListener,EventListener
All keyboard handling.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit()booleanbooleanChecks if a key is currently being clicked in any form.booleanbooleanisHold(int key) booleanisPressed(int key) booleanisReleased(int key) booleanvoidvoidvoidvoidvoidreset()
-
Constructor Details
-
Keyboard
public Keyboard()
-
-
Method Details
-
init
public void init() -
pollEvents
public void pollEvents() -
reset
public void reset() -
isClicked
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 exampleClickType.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
- Specified by:
keyTypedin interfaceKeyListener
-
keyPressed
- Specified by:
keyPressedin interfaceKeyListener
-
keyReleased
- Specified by:
keyReleasedin interfaceKeyListener
-