Class KeyCodeMap


  • public class KeyCodeMap
    extends java.lang.Object
    Maps 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
      int getKeyCode​(@NotNull java.lang.String keyName)
      Returns the key code for a key name.
      @NotNull java.lang.String getKeyName​(int keyCode)
      Returns the key name for a key code.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KeyCodeMap

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

      • getKeyCode

        public int getKeyCode​(@NotNull
                              @NotNull java.lang.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 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