Enum KeyboardLocation

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DOM_KEY_LOCATION_LEFT
      The key was the left-hand version of the key; for example, the left-hand Control key was pressed on a standard 101 key US keyboard.
      This value is only used for keys that have more than one possible location on the keyboard.
      DOM_KEY_LOCATION_NUMPAD
      The key was on the numeric keypad, or has a virtual key code that corresponds to the numeric keypad.
      DOM_KEY_LOCATION_RIGHT
      The key was the right-hand version of the key; for example, the right-hand Control key is pressed on a standard 101 key US keyboard.
      This value is only used for keys that have more than one possible location on the keyboard.
      DOM_KEY_LOCATION_STANDARD
      The key has only one version, or can't be distinguished between the left and right versions of the key, and was not pressed on the numeric keypad or a key that is considered to be part of the keypad.
    • Enum Constant Detail

      • DOM_KEY_LOCATION_STANDARD

        public static final KeyboardLocation DOM_KEY_LOCATION_STANDARD
        The key has only one version, or can't be distinguished between the left and right versions of the key, and was not pressed on the numeric keypad or a key that is considered to be part of the keypad.
      • DOM_KEY_LOCATION_LEFT

        public static final KeyboardLocation DOM_KEY_LOCATION_LEFT
        The key was the left-hand version of the key; for example, the left-hand Control key was pressed on a standard 101 key US keyboard.
        This value is only used for keys that have more than one possible location on the keyboard.
      • DOM_KEY_LOCATION_RIGHT

        public static final KeyboardLocation DOM_KEY_LOCATION_RIGHT
        The key was the right-hand version of the key; for example, the right-hand Control key is pressed on a standard 101 key US keyboard.
        This value is only used for keys that have more than one possible location on the keyboard.
      • DOM_KEY_LOCATION_NUMPAD

        public static final KeyboardLocation DOM_KEY_LOCATION_NUMPAD
        The key was on the numeric keypad, or has a virtual key code that corresponds to the numeric keypad.
    • Method Detail

      • values

        public static KeyboardLocation[] 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 (KeyboardLocation c : KeyboardLocation.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static KeyboardLocation 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
      • value

        public int value()
        Returns the numeric representation of the location.
        Returns:
        the numeric representation of the location
      • get

        public static final KeyboardLocation get​(int location)
        Scans all items of enumeration to get the right location related to passed argument.
        Parameters:
        location - specifies the location of the event flow
        Returns:
        the related location.
        If not found, returns always DOM_KEY_LOCATION_STANDARD.