Enum Keys

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.CharSequence, java.lang.Comparable<Keys>

    public enum Keys
    extends java.lang.Enum<Keys>
    implements java.lang.CharSequence
    Representations of pressable keys that aren't text. These are stored in the Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF.
    See Also:
    http://www.google.com.au/search?&q=unicode+pua&btnK=Search
    • Enum Constant Detail

      • NULL

        public static final Keys NULL
      • CANCEL

        public static final Keys CANCEL
      • HELP

        public static final Keys HELP
      • BACK_SPACE

        public static final Keys BACK_SPACE
      • TAB

        public static final Keys TAB
      • CLEAR

        public static final Keys CLEAR
      • RETURN

        public static final Keys RETURN
      • ENTER

        public static final Keys ENTER
      • SHIFT

        public static final Keys SHIFT
      • LEFT_SHIFT

        public static final Keys LEFT_SHIFT
      • CONTROL

        public static final Keys CONTROL
      • LEFT_CONTROL

        public static final Keys LEFT_CONTROL
      • ALT

        public static final Keys ALT
      • LEFT_ALT

        public static final Keys LEFT_ALT
      • PAUSE

        public static final Keys PAUSE
      • ESCAPE

        public static final Keys ESCAPE
      • SPACE

        public static final Keys SPACE
      • PAGE_UP

        public static final Keys PAGE_UP
      • PAGE_DOWN

        public static final Keys PAGE_DOWN
      • END

        public static final Keys END
      • HOME

        public static final Keys HOME
      • LEFT

        public static final Keys LEFT
      • ARROW_LEFT

        public static final Keys ARROW_LEFT
      • UP

        public static final Keys UP
      • ARROW_UP

        public static final Keys ARROW_UP
      • RIGHT

        public static final Keys RIGHT
      • ARROW_RIGHT

        public static final Keys ARROW_RIGHT
      • DOWN

        public static final Keys DOWN
      • ARROW_DOWN

        public static final Keys ARROW_DOWN
      • INSERT

        public static final Keys INSERT
      • DELETE

        public static final Keys DELETE
      • SEMICOLON

        public static final Keys SEMICOLON
      • EQUALS

        public static final Keys EQUALS
      • NUMPAD0

        public static final Keys NUMPAD0
      • NUMPAD1

        public static final Keys NUMPAD1
      • NUMPAD2

        public static final Keys NUMPAD2
      • NUMPAD3

        public static final Keys NUMPAD3
      • NUMPAD4

        public static final Keys NUMPAD4
      • NUMPAD5

        public static final Keys NUMPAD5
      • NUMPAD6

        public static final Keys NUMPAD6
      • NUMPAD7

        public static final Keys NUMPAD7
      • NUMPAD8

        public static final Keys NUMPAD8
      • NUMPAD9

        public static final Keys NUMPAD9
      • MULTIPLY

        public static final Keys MULTIPLY
      • ADD

        public static final Keys ADD
      • SEPARATOR

        public static final Keys SEPARATOR
      • SUBTRACT

        public static final Keys SUBTRACT
      • DECIMAL

        public static final Keys DECIMAL
      • DIVIDE

        public static final Keys DIVIDE
      • F1

        public static final Keys F1
      • F2

        public static final Keys F2
      • F3

        public static final Keys F3
      • F4

        public static final Keys F4
      • F5

        public static final Keys F5
      • F6

        public static final Keys F6
      • F7

        public static final Keys F7
      • F8

        public static final Keys F8
      • F9

        public static final Keys F9
      • F10

        public static final Keys F10
      • F11

        public static final Keys F11
      • F12

        public static final Keys F12
      • META

        public static final Keys META
      • COMMAND

        public static final Keys COMMAND
      • ZENKAKU_HANKAKU

        public static final Keys ZENKAKU_HANKAKU
    • 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​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getCodePoint

        public int getCodePoint()
      • charAt

        public char charAt​(int index)
        Specified by:
        charAt in interface java.lang.CharSequence
      • length

        public int length()
        Specified by:
        length in interface java.lang.CharSequence
      • subSequence

        public java.lang.CharSequence subSequence​(int start,
                                                  int end)
        Specified by:
        subSequence in interface java.lang.CharSequence
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface java.lang.CharSequence
        Overrides:
        toString in class java.lang.Enum<Keys>
      • chord

        public static java.lang.String chord​(java.lang.CharSequence... value)
        Simulate pressing many keys at once in a "chord". Takes a sequence of Keys.XXXX or strings; appends each of the values to a string, and adds the chord termination key (Keys.NULL) and returns the resultant string. Note: When the low-level webdriver key handlers see Keys.NULL, active modifier keys (CTRL/ALT/SHIFT/etc) release via a keyup event.
        Parameters:
        value - characters to send
        Returns:
        String representation of the char sequence
      • chord

        public static java.lang.String chord​(java.lang.Iterable<java.lang.CharSequence> value)
        Parameters:
        value - characters to send
        Returns:
        String representation of the char sequence
        See Also:
        chord(CharSequence...)
      • getKeyFromUnicode

        public static Keys getKeyFromUnicode​(char key)
        Get the special key representation, Keys, of the supplied character if there is one. If there is no special key tied to this character, null will be returned.
        Parameters:
        key - unicode character code
        Returns:
        special key linked to the character code, or null if character is not a special key