Class KeyCodeMap
java.lang.Object
com.realtime.crossfire.jxclient.gui.keybindings.KeyCodeMap
Maps between key codes integer constants and string representations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetKeyCode(@NotNull String keyName) Returns the key code for a key name.@NotNull StringgetKeyName(int keyCode) Returns the key name for a key code.
-
Constructor Details
-
KeyCodeMap
public KeyCodeMap()Creates a new instance.
-
-
Method Details
-
getKeyCode
Returns the key code for a key name.- Parameters:
keyName- the key name to convert- Returns:
- the key code
- Throws:
NoSuchKeyCodeException- if the key name is invalid
-
getKeyName
Returns the key name for a key code.- Parameters:
keyCode- the key code to convert- Returns:
- the key name
-