Enum Class KeySym

java.lang.Object
java.lang.Enum<KeySym>
de.bytestore.hostinger.entity.KeySym
All Implemented Interfaces:
io.jmix.core.metamodel.datatype.EnumClass<String>, Serializable, Comparable<KeySym>, Constable

public enum KeySym extends Enum<KeySym> implements io.jmix.core.metamodel.datatype.EnumClass<String>
The KeySym enum defines symbolic names for keyboard keys along with their corresponding escape sequences and Java KeyEvent constants. It provides an abstraction to map symbolic key identifiers to their respective KeyEvent values or escape sequences, enabling easier handling of keyboard input events in applications. Characteristics: - Each enum constant represents a specific key, including function keys, control keys, and arrow keys. - Encapsulates an escape sequence (used for identifying keys during terminal interaction) and a KeyEvent constant (used in Java's AWT/Swing for keyboard event representation). Methods: - getId: Returns the escape sequence associated with the key. - getKeyEvent: Retrieves the KeyEvent constant for the key. - fromId: Retrieves the associated KeySym enum value based on a given escape sequence. - fromKeyEvent: Retrieves the associated KeySym enum value based on a given KeyEvent constant. Usage Scenarios: - Facilitates the mapping and recognition of input from both terminal-based and graphical interface environments. - Provides utilities to translate between escape sequences and KeyEvent constants programmatically.
  • Enum Constant Details

    • F1

      public static final KeySym F1
    • F2

      public static final KeySym F2
    • F3

      public static final KeySym F3
    • F4

      public static final KeySym F4
    • F5

      public static final KeySym F5
    • F6

      public static final KeySym F6
    • F7

      public static final KeySym F7
    • F8

      public static final KeySym F8
    • F9

      public static final KeySym F9
    • F10

      public static final KeySym F10
    • F11

      public static final KeySym F11
    • F12

      public static final KeySym F12
    • CTRL

      public static final KeySym CTRL
    • ENTER

      public static final KeySym ENTER
    • ESCAPE

      public static final KeySym ESCAPE
    • ARROW_UP

      public static final KeySym ARROW_UP
    • ARROW_DOWN

      public static final KeySym ARROW_DOWN
    • ARROW_RIGHT

      public static final KeySym ARROW_RIGHT
    • ARROW_LEFT

      public static final KeySym ARROW_LEFT
  • Method Details

    • values

      public static KeySym[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static KeySym valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getId

      public String getId()
      Specified by:
      getId in interface io.jmix.core.metamodel.datatype.EnumClass<String>
    • getKeyEvent

      public int getKeyEvent()
    • fromId

      @Nullable public static KeySym fromId(String id)
    • fromKeyEvent

      @Nullable public static KeySym fromKeyEvent(int keyEvent)