Package de.coreengine.framework
Class Keyboard
- java.lang.Object
-
- de.coreengine.framework.Keyboard
-
public class Keyboard extends Object
Class for checking key states- Author:
- Darius Dinger
-
-
Field Summary
Fields Modifier and Type Field Description static int
KEY_0
static int
KEY_1
static int
KEY_2
static int
KEY_3
static int
KEY_4
static int
KEY_5
static int
KEY_6
static int
KEY_7
static int
KEY_8
static int
KEY_9
static int
KEY_A
static int
KEY_APOSTROPHE
static int
KEY_B
static int
KEY_BACKSLASH
static int
KEY_BACKSPACE
static int
KEY_C
static int
KEY_CAPS_LOCK
static int
KEY_COMMA
static int
KEY_D
static int
KEY_DELETE
static int
KEY_DOWN
static int
KEY_E
static int
KEY_END
static int
KEY_ENTER
static int
KEY_EQUAL
static int
KEY_ESCAPE
static int
KEY_F
static int
KEY_F1
static int
KEY_F10
static int
KEY_F11
static int
KEY_F12
static int
KEY_F13
static int
KEY_F14
static int
KEY_F15
static int
KEY_F16
static int
KEY_F17
static int
KEY_F18
static int
KEY_F19
static int
KEY_F2
static int
KEY_F20
static int
KEY_F21
static int
KEY_F22
static int
KEY_F23
static int
KEY_F24
static int
KEY_F25
static int
KEY_F3
static int
KEY_F4
static int
KEY_F5
static int
KEY_F6
static int
KEY_F7
static int
KEY_F8
static int
KEY_F9
static int
KEY_G
static int
KEY_GRAVE_ACCENT
static int
KEY_H
static int
KEY_HOME
static int
KEY_I
static int
KEY_INSERT
static int
KEY_J
static int
KEY_K
static int
KEY_KP_0
static int
KEY_KP_1
static int
KEY_KP_2
static int
KEY_KP_3
static int
KEY_KP_4
static int
KEY_KP_5
static int
KEY_KP_6
static int
KEY_KP_7
static int
KEY_KP_8
static int
KEY_KP_9
static int
KEY_KP_ADD
static int
KEY_KP_DECIMAL
static int
KEY_KP_DIVIDE
static int
KEY_KP_ENTER
static int
KEY_KP_EQUAL
static int
KEY_KP_MULTIPLY
static int
KEY_KP_SUBTRACT
static int
KEY_L
static int
KEY_LAST
static int
KEY_LEFT
static int
KEY_LEFT_ALT
static int
KEY_LEFT_BRACKET
static int
KEY_LEFT_CONTROL
static int
KEY_LEFT_SHIFT
static int
KEY_LEFT_SUPER
static int
KEY_M
static int
KEY_MENU
static int
KEY_MINUS
static int
KEY_N
static int
KEY_NUM_LOCK
static int
KEY_O
static int
KEY_P
static int
KEY_PAGE_DOWN
static int
KEY_PAGE_UP
static int
KEY_PAUSE
static int
KEY_PERIOD
static int
KEY_PRINT_SCREEN
static int
KEY_Q
static int
KEY_R
static int
KEY_RIGHT
static int
KEY_RIGHT_ALT
static int
KEY_RIGHT_BRACKET
static int
KEY_RIGHT_CONTROL
static int
KEY_RIGHT_SHIFT
static int
KEY_RIGHT_SUPER
static int
KEY_S
static int
KEY_SCROLL_LOCK
static int
KEY_SEMICOLON
static int
KEY_SLASH
static int
KEY_SPACE
static int
KEY_T
static int
KEY_TAB
static int
KEY_U
static int
KEY_UNKNOWN
static int
KEY_UP
static int
KEY_V
static int
KEY_W
static int
KEY_WORLD_1
static int
KEY_WORLD_2
static int
KEY_X
static int
KEY_Y
static int
KEY_Z
-
Constructor Summary
Constructors Constructor Description Keyboard()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>
getTypedChars()
static boolean
isKeyPressed(int keyCode)
Check if the key is pressed at the moment.
Returns false, if key code is out of range!static void
update()
Update keyboard listener
-
-
-
Field Detail
-
KEY_UNKNOWN
public static final int KEY_UNKNOWN
- See Also:
- Constant Field Values
-
KEY_SPACE
public static final int KEY_SPACE
- See Also:
- Constant Field Values
-
KEY_APOSTROPHE
public static final int KEY_APOSTROPHE
- See Also:
- Constant Field Values
-
KEY_COMMA
public static final int KEY_COMMA
- See Also:
- Constant Field Values
-
KEY_MINUS
public static final int KEY_MINUS
- See Also:
- Constant Field Values
-
KEY_PERIOD
public static final int KEY_PERIOD
- See Also:
- Constant Field Values
-
KEY_SLASH
public static final int KEY_SLASH
- See Also:
- Constant Field Values
-
KEY_0
public static final int KEY_0
- See Also:
- Constant Field Values
-
KEY_1
public static final int KEY_1
- See Also:
- Constant Field Values
-
KEY_2
public static final int KEY_2
- See Also:
- Constant Field Values
-
KEY_3
public static final int KEY_3
- See Also:
- Constant Field Values
-
KEY_4
public static final int KEY_4
- See Also:
- Constant Field Values
-
KEY_5
public static final int KEY_5
- See Also:
- Constant Field Values
-
KEY_6
public static final int KEY_6
- See Also:
- Constant Field Values
-
KEY_7
public static final int KEY_7
- See Also:
- Constant Field Values
-
KEY_8
public static final int KEY_8
- See Also:
- Constant Field Values
-
KEY_9
public static final int KEY_9
- See Also:
- Constant Field Values
-
KEY_SEMICOLON
public static final int KEY_SEMICOLON
- See Also:
- Constant Field Values
-
KEY_EQUAL
public static final int KEY_EQUAL
- See Also:
- Constant Field Values
-
KEY_A
public static final int KEY_A
- See Also:
- Constant Field Values
-
KEY_B
public static final int KEY_B
- See Also:
- Constant Field Values
-
KEY_C
public static final int KEY_C
- See Also:
- Constant Field Values
-
KEY_D
public static final int KEY_D
- See Also:
- Constant Field Values
-
KEY_E
public static final int KEY_E
- See Also:
- Constant Field Values
-
KEY_F
public static final int KEY_F
- See Also:
- Constant Field Values
-
KEY_G
public static final int KEY_G
- See Also:
- Constant Field Values
-
KEY_H
public static final int KEY_H
- See Also:
- Constant Field Values
-
KEY_I
public static final int KEY_I
- See Also:
- Constant Field Values
-
KEY_J
public static final int KEY_J
- See Also:
- Constant Field Values
-
KEY_K
public static final int KEY_K
- See Also:
- Constant Field Values
-
KEY_L
public static final int KEY_L
- See Also:
- Constant Field Values
-
KEY_M
public static final int KEY_M
- See Also:
- Constant Field Values
-
KEY_N
public static final int KEY_N
- See Also:
- Constant Field Values
-
KEY_O
public static final int KEY_O
- See Also:
- Constant Field Values
-
KEY_P
public static final int KEY_P
- See Also:
- Constant Field Values
-
KEY_Q
public static final int KEY_Q
- See Also:
- Constant Field Values
-
KEY_R
public static final int KEY_R
- See Also:
- Constant Field Values
-
KEY_S
public static final int KEY_S
- See Also:
- Constant Field Values
-
KEY_T
public static final int KEY_T
- See Also:
- Constant Field Values
-
KEY_U
public static final int KEY_U
- See Also:
- Constant Field Values
-
KEY_V
public static final int KEY_V
- See Also:
- Constant Field Values
-
KEY_W
public static final int KEY_W
- See Also:
- Constant Field Values
-
KEY_X
public static final int KEY_X
- See Also:
- Constant Field Values
-
KEY_Y
public static final int KEY_Y
- See Also:
- Constant Field Values
-
KEY_Z
public static final int KEY_Z
- See Also:
- Constant Field Values
-
KEY_LEFT_BRACKET
public static final int KEY_LEFT_BRACKET
- See Also:
- Constant Field Values
-
KEY_BACKSLASH
public static final int KEY_BACKSLASH
- See Also:
- Constant Field Values
-
KEY_RIGHT_BRACKET
public static final int KEY_RIGHT_BRACKET
- See Also:
- Constant Field Values
-
KEY_GRAVE_ACCENT
public static final int KEY_GRAVE_ACCENT
- See Also:
- Constant Field Values
-
KEY_WORLD_1
public static final int KEY_WORLD_1
- See Also:
- Constant Field Values
-
KEY_WORLD_2
public static final int KEY_WORLD_2
- See Also:
- Constant Field Values
-
KEY_ESCAPE
public static final int KEY_ESCAPE
- See Also:
- Constant Field Values
-
KEY_ENTER
public static final int KEY_ENTER
- See Also:
- Constant Field Values
-
KEY_TAB
public static final int KEY_TAB
- See Also:
- Constant Field Values
-
KEY_BACKSPACE
public static final int KEY_BACKSPACE
- See Also:
- Constant Field Values
-
KEY_INSERT
public static final int KEY_INSERT
- See Also:
- Constant Field Values
-
KEY_DELETE
public static final int KEY_DELETE
- See Also:
- Constant Field Values
-
KEY_RIGHT
public static final int KEY_RIGHT
- See Also:
- Constant Field Values
-
KEY_LEFT
public static final int KEY_LEFT
- See Also:
- Constant Field Values
-
KEY_DOWN
public static final int KEY_DOWN
- See Also:
- Constant Field Values
-
KEY_UP
public static final int KEY_UP
- See Also:
- Constant Field Values
-
KEY_PAGE_UP
public static final int KEY_PAGE_UP
- See Also:
- Constant Field Values
-
KEY_PAGE_DOWN
public static final int KEY_PAGE_DOWN
- See Also:
- Constant Field Values
-
KEY_HOME
public static final int KEY_HOME
- See Also:
- Constant Field Values
-
KEY_END
public static final int KEY_END
- See Also:
- Constant Field Values
-
KEY_CAPS_LOCK
public static final int KEY_CAPS_LOCK
- See Also:
- Constant Field Values
-
KEY_SCROLL_LOCK
public static final int KEY_SCROLL_LOCK
- See Also:
- Constant Field Values
-
KEY_NUM_LOCK
public static final int KEY_NUM_LOCK
- See Also:
- Constant Field Values
-
KEY_PRINT_SCREEN
public static final int KEY_PRINT_SCREEN
- See Also:
- Constant Field Values
-
KEY_PAUSE
public static final int KEY_PAUSE
- See Also:
- Constant Field Values
-
KEY_F1
public static final int KEY_F1
- See Also:
- Constant Field Values
-
KEY_F2
public static final int KEY_F2
- See Also:
- Constant Field Values
-
KEY_F3
public static final int KEY_F3
- See Also:
- Constant Field Values
-
KEY_F4
public static final int KEY_F4
- See Also:
- Constant Field Values
-
KEY_F5
public static final int KEY_F5
- See Also:
- Constant Field Values
-
KEY_F6
public static final int KEY_F6
- See Also:
- Constant Field Values
-
KEY_F7
public static final int KEY_F7
- See Also:
- Constant Field Values
-
KEY_F8
public static final int KEY_F8
- See Also:
- Constant Field Values
-
KEY_F9
public static final int KEY_F9
- See Also:
- Constant Field Values
-
KEY_F10
public static final int KEY_F10
- See Also:
- Constant Field Values
-
KEY_F11
public static final int KEY_F11
- See Also:
- Constant Field Values
-
KEY_F12
public static final int KEY_F12
- See Also:
- Constant Field Values
-
KEY_F13
public static final int KEY_F13
- See Also:
- Constant Field Values
-
KEY_F14
public static final int KEY_F14
- See Also:
- Constant Field Values
-
KEY_F15
public static final int KEY_F15
- See Also:
- Constant Field Values
-
KEY_F16
public static final int KEY_F16
- See Also:
- Constant Field Values
-
KEY_F17
public static final int KEY_F17
- See Also:
- Constant Field Values
-
KEY_F18
public static final int KEY_F18
- See Also:
- Constant Field Values
-
KEY_F19
public static final int KEY_F19
- See Also:
- Constant Field Values
-
KEY_F20
public static final int KEY_F20
- See Also:
- Constant Field Values
-
KEY_F21
public static final int KEY_F21
- See Also:
- Constant Field Values
-
KEY_F22
public static final int KEY_F22
- See Also:
- Constant Field Values
-
KEY_F23
public static final int KEY_F23
- See Also:
- Constant Field Values
-
KEY_F24
public static final int KEY_F24
- See Also:
- Constant Field Values
-
KEY_F25
public static final int KEY_F25
- See Also:
- Constant Field Values
-
KEY_KP_0
public static final int KEY_KP_0
- See Also:
- Constant Field Values
-
KEY_KP_1
public static final int KEY_KP_1
- See Also:
- Constant Field Values
-
KEY_KP_2
public static final int KEY_KP_2
- See Also:
- Constant Field Values
-
KEY_KP_3
public static final int KEY_KP_3
- See Also:
- Constant Field Values
-
KEY_KP_4
public static final int KEY_KP_4
- See Also:
- Constant Field Values
-
KEY_KP_5
public static final int KEY_KP_5
- See Also:
- Constant Field Values
-
KEY_KP_6
public static final int KEY_KP_6
- See Also:
- Constant Field Values
-
KEY_KP_7
public static final int KEY_KP_7
- See Also:
- Constant Field Values
-
KEY_KP_8
public static final int KEY_KP_8
- See Also:
- Constant Field Values
-
KEY_KP_9
public static final int KEY_KP_9
- See Also:
- Constant Field Values
-
KEY_KP_DECIMAL
public static final int KEY_KP_DECIMAL
- See Also:
- Constant Field Values
-
KEY_KP_DIVIDE
public static final int KEY_KP_DIVIDE
- See Also:
- Constant Field Values
-
KEY_KP_MULTIPLY
public static final int KEY_KP_MULTIPLY
- See Also:
- Constant Field Values
-
KEY_KP_SUBTRACT
public static final int KEY_KP_SUBTRACT
- See Also:
- Constant Field Values
-
KEY_KP_ADD
public static final int KEY_KP_ADD
- See Also:
- Constant Field Values
-
KEY_KP_ENTER
public static final int KEY_KP_ENTER
- See Also:
- Constant Field Values
-
KEY_KP_EQUAL
public static final int KEY_KP_EQUAL
- See Also:
- Constant Field Values
-
KEY_LEFT_SHIFT
public static final int KEY_LEFT_SHIFT
- See Also:
- Constant Field Values
-
KEY_LEFT_CONTROL
public static final int KEY_LEFT_CONTROL
- See Also:
- Constant Field Values
-
KEY_LEFT_ALT
public static final int KEY_LEFT_ALT
- See Also:
- Constant Field Values
-
KEY_LEFT_SUPER
public static final int KEY_LEFT_SUPER
- See Also:
- Constant Field Values
-
KEY_RIGHT_SHIFT
public static final int KEY_RIGHT_SHIFT
- See Also:
- Constant Field Values
-
KEY_RIGHT_CONTROL
public static final int KEY_RIGHT_CONTROL
- See Also:
- Constant Field Values
-
KEY_RIGHT_ALT
public static final int KEY_RIGHT_ALT
- See Also:
- Constant Field Values
-
KEY_RIGHT_SUPER
public static final int KEY_RIGHT_SUPER
- See Also:
- Constant Field Values
-
KEY_MENU
public static final int KEY_MENU
- See Also:
- Constant Field Values
-
KEY_LAST
public static final int KEY_LAST
- See Also:
- Constant Field Values
-
-
Method Detail
-
isKeyPressed
public static boolean isKeyPressed(int keyCode)
Check if the key is pressed at the moment.
Returns false, if key code is out of range!- Parameters:
keyCode
- Code of the key to check- Returns:
- True if the key is pressed, else false
-
update
public static void update()
Update keyboard listener
-
-