Class KeyCodeMap
- java.lang.Object
-
- com.realtime.crossfire.jxclient.gui.keybindings.KeyCodeMap
-
public class KeyCodeMap extends java.lang.ObjectMaps between key codes integer constants and string representations.
-
-
Constructor Summary
Constructors Constructor Description KeyCodeMap()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetKeyCode(@NotNull java.lang.String keyName)Returns the key code for a key name.@NotNull java.lang.StringgetKeyName(int keyCode)Returns the key name for a key code.
-
-
-
Method Detail
-
getKeyCode
public int getKeyCode(@NotNull @NotNull java.lang.String keyName) throws NoSuchKeyCodeExceptionReturns 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
@NotNull public @NotNull java.lang.String getKeyName(int keyCode)
Returns the key name for a key code.- Parameters:
keyCode- the key code to convert- Returns:
- the key name
-
-