java.lang.Object
com.realtime.crossfire.jxclient.gui.keybindings.KeyCodeMap

public class KeyCodeMap extends Object
Maps between key codes integer constants and string representations.
  • Constructor Details

    • KeyCodeMap

      public KeyCodeMap()
      Creates a new instance.
  • Method Details

    • getKeyCode

      public int getKeyCode(@NotNull @NotNull String keyName) throws NoSuchKeyCodeException
      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

      @NotNull public @NotNull String getKeyName(int keyCode)
      Returns the key name for a key code.
      Parameters:
      keyCode - the key code to convert
      Returns:
      the key name