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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
init()
boolean
boolean
Checks if a key is currently being clicked in any form.boolean
boolean
isHold
(int key) boolean
isPressed
(int key) boolean
isReleased
(int key) boolean
void
void
void
void
void
reset()
-
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:
keyTyped
in interfaceKeyListener
-
keyPressed
- Specified by:
keyPressed
in interfaceKeyListener
-
keyReleased
- Specified by:
keyReleased
in interfaceKeyListener
-