Enum Keys

  • All Implemented Interfaces:
    Serializable, Comparable<Keys>

    public enum Keys
    extends Enum<Keys>

    An enumeration class defining constants for special keys on a standard keyboard.

    This enumeration class is used for defining special keys in a way independent on a specific GUI library. It contains constants for keys that do not represent normal alphanumeric letters or viewable characters, but have a special meaning.

    Version:
    $Id: Keys.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • Enum Constant Detail

      • BACKSPACE

        public static final Keys BACKSPACE
        The backspace key.
      • DELETE

        public static final Keys DELETE
        The delete key.
      • DOWN

        public static final Keys DOWN
        The down arrow key.
      • END

        public static final Keys END
        The end key.
      • ENTER

        public static final Keys ENTER
        The enter key.
      • ESCAPE

        public static final Keys ESCAPE
        The escape key.
      • F1

        public static final Keys F1
        The function key F1.
      • F2

        public static final Keys F2
        The function key F2.
      • F3

        public static final Keys F3
        The function key F3.
      • F4

        public static final Keys F4
        The function key F4.
      • F5

        public static final Keys F5
        The function key F5.
      • F6

        public static final Keys F6
        The function key F6.
      • F7

        public static final Keys F7
        The function key F7.
      • F8

        public static final Keys F8
        The function key F8.
      • F9

        public static final Keys F9
        The function key F9.
      • F10

        public static final Keys F10
        The function key F10.
      • F11

        public static final Keys F11
        The function key F11.
      • F12

        public static final Keys F12
        The function key F12.
      • F13

        public static final Keys F13
        The function key F13.
      • F14

        public static final Keys F14
        The function key F14.
      • F15

        public static final Keys F15
        The function key F15.
      • F16

        public static final Keys F16
        The function key F16.
      • HOME

        public static final Keys HOME
        The home key.
      • INSERT

        public static final Keys INSERT
        The insert key.
      • LEFT

        public static final Keys LEFT
        The left arrow key.
      • PAGE_DOWN

        public static final Keys PAGE_DOWN
        The page down key.
      • PAGE_UP

        public static final Keys PAGE_UP
        The page up key.
      • PRINT_SCREEN

        public static final Keys PRINT_SCREEN
        The print screen key.
      • RIGHT

        public static final Keys RIGHT
        The right arrow key.
      • SPACE

        public static final Keys SPACE
        The space key.
      • TAB

        public static final Keys TAB
        The tab key.
      • UP

        public static final Keys UP
        The up arrow key.
    • Method Detail

      • values

        public static Keys[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Keys c : Keys.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Keys valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null