Module org.htmlunit

Class KeyboardEvent

java.lang.Object
org.htmlunit.corejs.javascript.SlotMapOwner<org.htmlunit.corejs.javascript.Scriptable>
org.htmlunit.corejs.javascript.ScriptableObject
All Implemented Interfaces:
Serializable, Cloneable, org.htmlunit.corejs.javascript.ConstProperties<org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.debug.DebuggableObject, org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable

public class KeyboardEvent extends UIEvent
JavaScript host object for KeyboardEvent.
Author:
Ahmed Ashour, Frank Danek, Ronald Brill, Joerg Werner
See Also:
  • Field Details

    • DOM_KEY_LOCATION_STANDARD

      public static final int DOM_KEY_LOCATION_STANDARD
      Constant for DOM_KEY_LOCATION_STANDARD.
      See Also:
    • DOM_KEY_LOCATION_LEFT

      public static final int DOM_KEY_LOCATION_LEFT
      Constant for DOM_KEY_LOCATION_LEFT.
      See Also:
    • DOM_KEY_LOCATION_RIGHT

      public static final int DOM_KEY_LOCATION_RIGHT
      Constant for DOM_KEY_LOCATION_RIGHT.
      See Also:
    • DOM_KEY_LOCATION_NUMPAD

      public static final int DOM_KEY_LOCATION_NUMPAD
      Constant for DOM_KEY_LOCATION_NUMPAD.
      See Also:
    • DOM_VK_CANCEL

      public static final int DOM_VK_CANCEL
      Constant for DOM_VK_CANCEL.
      See Also:
    • DOM_VK_HELP

      public static final int DOM_VK_HELP
      Constant for DOM_VK_HELP.
      See Also:
    • DOM_VK_TAB

      public static final int DOM_VK_TAB
      Constant for DOM_VK_TAB.
      See Also:
    • DOM_VK_CLEAR

      public static final int DOM_VK_CLEAR
      Constant for DOM_VK_CLEAR.
      See Also:
    • DOM_VK_RETURN

      public static final int DOM_VK_RETURN
      Constant for DOM_VK_RETURN.
      See Also:
    • DOM_VK_SHIFT

      public static final int DOM_VK_SHIFT
      Constant for DOM_VK_SHIFT.
      See Also:
    • DOM_VK_CONTROL

      public static final int DOM_VK_CONTROL
      Constant for DOM_VK_CONTROL.
      See Also:
    • DOM_VK_ALT

      public static final int DOM_VK_ALT
      Constant for DOM_VK_ALT.
      See Also:
    • DOM_VK_PAUSE

      public static final int DOM_VK_PAUSE
      Constant for DOM_VK_PAUSE.
      See Also:
    • DOM_VK_CAPS_LOCK

      public static final int DOM_VK_CAPS_LOCK
      Constant for DOM_VK_CAPS_LOCK.
      See Also:
    • DOM_VK_HANGUL

      public static final int DOM_VK_HANGUL
      Constant for DOM_VK_HANGUL.
      See Also:
    • DOM_VK_KANA

      public static final int DOM_VK_KANA
      Constant for DOM_VK_KANA.
      See Also:
    • DOM_VK_EISU

      public static final int DOM_VK_EISU
      Constant for DOM_VK_EISU.
      See Also:
    • DOM_VK_FINAL

      public static final int DOM_VK_FINAL
      Constant for DOM_VK_FINAL.
      See Also:
    • DOM_VK_JUNJA

      public static final int DOM_VK_JUNJA
      Constant for DOM_VK_JUNJA.
      See Also:
    • DOM_VK_HANJA

      public static final int DOM_VK_HANJA
      Constant for DOM_VK_HANJA.
      See Also:
    • DOM_VK_KANJI

      public static final int DOM_VK_KANJI
      Constant for DOM_VK_KANJI.
      See Also:
    • DOM_VK_ESCAPE

      public static final int DOM_VK_ESCAPE
      Constant for DOM_VK_ESCAPE.
      See Also:
    • DOM_VK_CONVERT

      public static final int DOM_VK_CONVERT
      Constant for DOM_VK_CONVERT.
      See Also:
    • DOM_VK_NONCONVERT

      public static final int DOM_VK_NONCONVERT
      Constant for DOM_VK_NONCONVERT.
      See Also:
    • DOM_VK_ACCEPT

      public static final int DOM_VK_ACCEPT
      Constant for DOM_VK_ACCEPT.
      See Also:
    • DOM_VK_MODECHANGE

      public static final int DOM_VK_MODECHANGE
      Constant for DOM_VK_MODECHANGE.
      See Also:
    • DOM_VK_SPACE

      public static final int DOM_VK_SPACE
      Constant for DOM_VK_SPACE.
      See Also:
    • DOM_VK_PAGE_UP

      public static final int DOM_VK_PAGE_UP
      Constant for DOM_VK_PAGE_UP.
      See Also:
    • DOM_VK_PAGE_DOWN

      public static final int DOM_VK_PAGE_DOWN
      Constant for DOM_VK_PAGE_DOWN.
      See Also:
    • DOM_VK_END

      public static final int DOM_VK_END
      Constant for DOM_VK_END.
      See Also:
    • DOM_VK_HOME

      public static final int DOM_VK_HOME
      Constant for DOM_VK_HOME.
      See Also:
    • DOM_VK_LEFT

      public static final int DOM_VK_LEFT
      Constant for DOM_VK_LEFT.
      See Also:
    • DOM_VK_UP

      public static final int DOM_VK_UP
      Constant for DOM_VK_UP.
      See Also:
    • DOM_VK_RIGHT

      public static final int DOM_VK_RIGHT
      Constant for DOM_VK_RIGHT.
      See Also:
    • DOM_VK_SELECT

      public static final int DOM_VK_SELECT
      Constant for DOM_VK_SELECT.
      See Also:
    • DOM_VK_DOWN

      public static final int DOM_VK_DOWN
      Constant for DOM_VK_DOWN.
      See Also:
    • DOM_VK_PRINT

      public static final int DOM_VK_PRINT
      Constant for DOM_VK_PRINT.
      See Also:
    • DOM_VK_EXECUTE

      public static final int DOM_VK_EXECUTE
      Constant for DOM_VK_EXECUTE.
      See Also:
    • DOM_VK_PRINTSCREEN

      public static final int DOM_VK_PRINTSCREEN
      Constant for DOM_VK_PRINTSCREEN.
      See Also:
    • DOM_VK_INSERT

      public static final int DOM_VK_INSERT
      Constant for DOM_VK_INSERT.
      See Also:
    • DOM_VK_DELETE

      public static final int DOM_VK_DELETE
      Constant for DOM_VK_DELETE.
      See Also:
    • DOM_VK_0

      public static final int DOM_VK_0
      Constant for DOM_VK_0.
      See Also:
    • DOM_VK_1

      public static final int DOM_VK_1
      Constant for DOM_VK_1.
      See Also:
    • DOM_VK_2

      public static final int DOM_VK_2
      Constant for DOM_VK_2.
      See Also:
    • DOM_VK_3

      public static final int DOM_VK_3
      Constant for DOM_VK_3.
      See Also:
    • DOM_VK_4

      public static final int DOM_VK_4
      Constant for DOM_VK_4.
      See Also:
    • DOM_VK_5

      public static final int DOM_VK_5
      Constant for DOM_VK_5.
      See Also:
    • DOM_VK_6

      public static final int DOM_VK_6
      Constant for DOM_VK_6.
      See Also:
    • DOM_VK_7

      public static final int DOM_VK_7
      Constant for DOM_VK_7.
      See Also:
    • DOM_VK_8

      public static final int DOM_VK_8
      Constant for DOM_VK_8.
      See Also:
    • DOM_VK_9

      public static final int DOM_VK_9
      Constant for DOM_VK_9.
      See Also:
    • DOM_VK_COLON

      public static final int DOM_VK_COLON
      Constant for DOM_VK_COLON.
      See Also:
    • DOM_VK_SEMICOLON

      public static final int DOM_VK_SEMICOLON
      Constant for DOM_VK_SEMICOLON.
      See Also:
    • DOM_VK_LESS_THAN

      public static final int DOM_VK_LESS_THAN
      Constant for DOM_VK_LESS_THAN.
      See Also:
    • DOM_VK_EQUALS

      public static final int DOM_VK_EQUALS
      Constant for DOM_VK_EQUALS.
      See Also:
    • DOM_VK_GREATER_THAN

      public static final int DOM_VK_GREATER_THAN
      Constant for DOM_VK_GREATER_THAN.
      See Also:
    • DOM_VK_QUESTION_MARK

      public static final int DOM_VK_QUESTION_MARK
      Constant for DOM_VK_QUESTION_MARK.
      See Also:
    • DOM_VK_AT

      public static final int DOM_VK_AT
      Constant for DOM_VK_AT.
      See Also:
    • DOM_VK_A

      public static final int DOM_VK_A
      Constant for DOM_VK_A.
      See Also:
    • DOM_VK_B

      public static final int DOM_VK_B
      Constant for DOM_VK_B.
      See Also:
    • DOM_VK_C

      public static final int DOM_VK_C
      Constant for DOM_VK_C.
      See Also:
    • DOM_VK_D

      public static final int DOM_VK_D
      Constant for DOM_VK_D.
      See Also:
    • DOM_VK_E

      public static final int DOM_VK_E
      Constant for DOM_VK_E.
      See Also:
    • DOM_VK_F

      public static final int DOM_VK_F
      Constant for DOM_VK_F.
      See Also:
    • DOM_VK_G

      public static final int DOM_VK_G
      Constant for DOM_VK_G.
      See Also:
    • DOM_VK_H

      public static final int DOM_VK_H
      Constant for DOM_VK_H.
      See Also:
    • DOM_VK_I

      public static final int DOM_VK_I
      Constant for DOM_VK_I.
      See Also:
    • DOM_VK_J

      public static final int DOM_VK_J
      Constant for DOM_VK_J.
      See Also:
    • DOM_VK_K

      public static final int DOM_VK_K
      Constant for DOM_VK_K.
      See Also:
    • DOM_VK_L

      public static final int DOM_VK_L
      Constant for DOM_VK_L.
      See Also:
    • DOM_VK_M

      public static final int DOM_VK_M
      Constant for DOM_VK_M.
      See Also:
    • DOM_VK_N

      public static final int DOM_VK_N
      Constant for DOM_VK_N.
      See Also:
    • DOM_VK_O

      public static final int DOM_VK_O
      Constant for DOM_VK_O.
      See Also:
    • DOM_VK_BACK_SPACE

      public static final int DOM_VK_BACK_SPACE
      Constant for DOM_VK_BACK_SPACE.
      See Also:
    • DOM_VK_P

      public static final int DOM_VK_P
      Constant for DOM_VK_P.
      See Also:
    • DOM_VK_Q

      public static final int DOM_VK_Q
      Constant for DOM_VK_Q.
      See Also:
    • DOM_VK_R

      public static final int DOM_VK_R
      Constant for DOM_VK_R.
      See Also:
    • DOM_VK_S

      public static final int DOM_VK_S
      Constant for DOM_VK_S.
      See Also:
    • DOM_VK_T

      public static final int DOM_VK_T
      Constant for DOM_VK_T.
      See Also:
    • DOM_VK_U

      public static final int DOM_VK_U
      Constant for DOM_VK_U.
      See Also:
    • DOM_VK_V

      public static final int DOM_VK_V
      Constant for DOM_VK_V.
      See Also:
    • DOM_VK_W

      public static final int DOM_VK_W
      Constant for DOM_VK_W.
      See Also:
    • DOM_VK_X

      public static final int DOM_VK_X
      Constant for DOM_VK_X.
      See Also:
    • DOM_VK_Y

      public static final int DOM_VK_Y
      Constant for DOM_VK_Y.
      See Also:
    • DOM_VK_Z

      public static final int DOM_VK_Z
      Constant for DOM_VK_Z.
      See Also:
    • DOM_VK_WIN

      public static final int DOM_VK_WIN
      Constant for DOM_VK_WIN.
      See Also:
    • DOM_VK_CONTEXT_MENU

      public static final int DOM_VK_CONTEXT_MENU
      Constant for DOM_VK_CONTEXT_MENU.
      See Also:
    • DOM_VK_SLEEP

      public static final int DOM_VK_SLEEP
      Constant for DOM_VK_SLEEP.
      See Also:
    • DOM_VK_NUMPAD0

      public static final int DOM_VK_NUMPAD0
      Constant for DOM_VK_NUMPAD0.
      See Also:
    • DOM_VK_NUMPAD1

      public static final int DOM_VK_NUMPAD1
      Constant for DOM_VK_NUMPAD1.
      See Also:
    • DOM_VK_NUMPAD2

      public static final int DOM_VK_NUMPAD2
      Constant for DOM_VK_NUMPAD2.
      See Also:
    • DOM_VK_NUMPAD3

      public static final int DOM_VK_NUMPAD3
      Constant for DOM_VK_NUMPAD3.
      See Also:
    • DOM_VK_NUMPAD4

      public static final int DOM_VK_NUMPAD4
      Constant for DOM_VK_NUMPAD4.
      See Also:
    • DOM_VK_NUMPAD5

      public static final int DOM_VK_NUMPAD5
      Constant for DOM_VK_NUMPAD5.
      See Also:
    • DOM_VK_NUMPAD6

      public static final int DOM_VK_NUMPAD6
      Constant for DOM_VK_NUMPAD6.
      See Also:
    • DOM_VK_NUMPAD7

      public static final int DOM_VK_NUMPAD7
      Constant for DOM_VK_NUMPAD7.
      See Also:
    • DOM_VK_NUMPAD8

      public static final int DOM_VK_NUMPAD8
      Constant for DOM_VK_NUMPAD8.
      See Also:
    • DOM_VK_NUMPAD9

      public static final int DOM_VK_NUMPAD9
      Constant for DOM_VK_NUMPAD9.
      See Also:
    • DOM_VK_MULTIPLY

      public static final int DOM_VK_MULTIPLY
      Constant for DOM_VK_MULTIPLY.
      See Also:
    • DOM_VK_ADD

      public static final int DOM_VK_ADD
      Constant for DOM_VK_ADD.
      See Also:
    • DOM_VK_SEPARATOR

      public static final int DOM_VK_SEPARATOR
      Constant for DOM_VK_SEPARATOR.
      See Also:
    • DOM_VK_SUBTRACT

      public static final int DOM_VK_SUBTRACT
      Constant for DOM_VK_SUBTRACT.
      See Also:
    • DOM_VK_DECIMAL

      public static final int DOM_VK_DECIMAL
      Constant for DOM_VK_DECIMAL.
      See Also:
    • DOM_VK_DIVIDE

      public static final int DOM_VK_DIVIDE
      Constant for DOM_VK_DIVIDE.
      See Also:
    • DOM_VK_F1

      public static final int DOM_VK_F1
      Constant for DOM_VK_F1.
      See Also:
    • DOM_VK_F2

      public static final int DOM_VK_F2
      Constant for DOM_VK_F2.
      See Also:
    • DOM_VK_F3

      public static final int DOM_VK_F3
      Constant for DOM_VK_F3.
      See Also:
    • DOM_VK_F4

      public static final int DOM_VK_F4
      Constant for DOM_VK_F4.
      See Also:
    • DOM_VK_F5

      public static final int DOM_VK_F5
      Constant for DOM_VK_F5.
      See Also:
    • DOM_VK_F6

      public static final int DOM_VK_F6
      Constant for DOM_VK_F6.
      See Also:
    • DOM_VK_F7

      public static final int DOM_VK_F7
      Constant for DOM_VK_F7.
      See Also:
    • DOM_VK_F8

      public static final int DOM_VK_F8
      Constant for DOM_VK_F8.
      See Also:
    • DOM_VK_F9

      public static final int DOM_VK_F9
      Constant for DOM_VK_F9.
      See Also:
    • DOM_VK_F10

      public static final int DOM_VK_F10
      Constant for DOM_VK_F10.
      See Also:
    • DOM_VK_F11

      public static final int DOM_VK_F11
      Constant for DOM_VK_F11.
      See Also:
    • DOM_VK_F12

      public static final int DOM_VK_F12
      Constant for DOM_VK_F12.
      See Also:
    • DOM_VK_F13

      public static final int DOM_VK_F13
      Constant for DOM_VK_F13.
      See Also:
    • DOM_VK_F14

      public static final int DOM_VK_F14
      Constant for DOM_VK_F14.
      See Also:
    • DOM_VK_F15

      public static final int DOM_VK_F15
      Constant for DOM_VK_F15.
      See Also:
    • DOM_VK_F16

      public static final int DOM_VK_F16
      Constant for DOM_VK_F16.
      See Also:
    • DOM_VK_F17

      public static final int DOM_VK_F17
      Constant for DOM_VK_F17.
      See Also:
    • DOM_VK_F18

      public static final int DOM_VK_F18
      Constant for DOM_VK_F18.
      See Also:
    • DOM_VK_F19

      public static final int DOM_VK_F19
      Constant for DOM_VK_F19.
      See Also:
    • DOM_VK_F20

      public static final int DOM_VK_F20
      Constant for DOM_VK_F20.
      See Also:
    • DOM_VK_F21

      public static final int DOM_VK_F21
      Constant for DOM_VK_F21.
      See Also:
    • DOM_VK_F22

      public static final int DOM_VK_F22
      Constant for DOM_VK_F22.
      See Also:
    • DOM_VK_F23

      public static final int DOM_VK_F23
      Constant for DOM_VK_F23.
      See Also:
    • DOM_VK_F24

      public static final int DOM_VK_F24
      Constant for DOM_VK_F24.
      See Also:
    • DOM_VK_NUM_LOCK

      public static final int DOM_VK_NUM_LOCK
      Constant for DOM_VK_NUM_LOCK.
      See Also:
    • DOM_VK_SCROLL_LOCK

      public static final int DOM_VK_SCROLL_LOCK
      Constant for DOM_VK_SCROLL_LOCK.
      See Also:
    • DOM_VK_WIN_OEM_FJ_JISHO

      public static final int DOM_VK_WIN_OEM_FJ_JISHO
      Constant for DOM_VK_WIN_OEM_FJ_JISHO.
      See Also:
    • DOM_VK_WIN_OEM_FJ_MASSHOU

      public static final int DOM_VK_WIN_OEM_FJ_MASSHOU
      Constant for DOM_VK_WIN_OEM_FJ_MASSHOU.
      See Also:
    • DOM_VK_WIN_OEM_FJ_TOUROKU

      public static final int DOM_VK_WIN_OEM_FJ_TOUROKU
      Constant for DOM_VK_WIN_OEM_FJ_TOUROKU.
      See Also:
    • DOM_VK_WIN_OEM_FJ_LOYA

      public static final int DOM_VK_WIN_OEM_FJ_LOYA
      Constant for DOM_VK_WIN_OEM_FJ_LOYA.
      See Also:
    • DOM_VK_WIN_OEM_FJ_ROYA

      public static final int DOM_VK_WIN_OEM_FJ_ROYA
      Constant for DOM_VK_WIN_OEM_FJ_ROYA.
      See Also:
    • DOM_VK_CIRCUMFLEX

      public static final int DOM_VK_CIRCUMFLEX
      Constant for DOM_VK_CIRCUMFLEX.
      See Also:
    • DOM_VK_EXCLAMATION

      public static final int DOM_VK_EXCLAMATION
      Constant for DOM_VK_EXCLAMATION.
      See Also:
    • DOM_VK_DOUBLE_QUOTE

      public static final int DOM_VK_DOUBLE_QUOTE
      Constant for DOM_VK_DOUBLE_QUOTE.
      See Also:
    • DOM_VK_HASH

      public static final int DOM_VK_HASH
      Constant for DOM_VK_HASH.
      See Also:
    • DOM_VK_DOLLAR

      public static final int DOM_VK_DOLLAR
      Constant for DOM_VK_DOLLAR.
      See Also:
    • DOM_VK_PERCENT

      public static final int DOM_VK_PERCENT
      Constant for DOM_VK_PERCENT.
      See Also:
    • DOM_VK_AMPERSAND

      public static final int DOM_VK_AMPERSAND
      Constant for DOM_VK_AMPERSAND.
      See Also:
    • DOM_VK_UNDERSCORE

      public static final int DOM_VK_UNDERSCORE
      Constant for DOM_VK_UNDERSCORE.
      See Also:
    • DOM_VK_OPEN_PAREN

      public static final int DOM_VK_OPEN_PAREN
      Constant for DOM_VK_OPEN_PAREN.
      See Also:
    • DOM_VK_CLOSE_PAREN

      public static final int DOM_VK_CLOSE_PAREN
      Constant for DOM_VK_CLOSE_PAREN.
      See Also:
    • DOM_VK_ASTERISK

      public static final int DOM_VK_ASTERISK
      Constant for DOM_VK_ASTERISK.
      See Also:
    • DOM_VK_PLUS

      public static final int DOM_VK_PLUS
      Constant for DOM_VK_PLUS.
      See Also:
    • DOM_VK_PIPE

      public static final int DOM_VK_PIPE
      Constant for DOM_VK_PIPE.
      See Also:
    • DOM_VK_HYPHEN_MINUS

      public static final int DOM_VK_HYPHEN_MINUS
      Constant for DOM_VK_HYPHEN_MINUS.
      See Also:
    • DOM_VK_OPEN_CURLY_BRACKET

      public static final int DOM_VK_OPEN_CURLY_BRACKET
      Constant for DOM_VK_OPEN_CURLY_BRACKET.
      See Also:
    • DOM_VK_CLOSE_CURLY_BRACKET

      public static final int DOM_VK_CLOSE_CURLY_BRACKET
      Constant for DOM_VK_CLOSE_CURLY_BRACKET.
      See Also:
    • DOM_VK_TILDE

      public static final int DOM_VK_TILDE
      Constant for DOM_VK_TILDE.
      See Also:
    • DOM_VK_VOLUME_MUTE

      public static final int DOM_VK_VOLUME_MUTE
      Constant for DOM_VK_VOLUME_MUTE.
      See Also:
    • DOM_VK_VOLUME_DOWN

      public static final int DOM_VK_VOLUME_DOWN
      Constant for DOM_VK_VOLUME_DOWN.
      See Also:
    • DOM_VK_VOLUME_UP

      public static final int DOM_VK_VOLUME_UP
      Constant for DOM_VK_VOLUME_UP.
      See Also:
    • DOM_VK_COMMA

      public static final int DOM_VK_COMMA
      Constant for DOM_VK_COMMA.
      See Also:
    • DOM_VK_PERIOD

      public static final int DOM_VK_PERIOD
      Constant for DOM_VK_PERIOD.
      See Also:
    • DOM_VK_SLASH

      public static final int DOM_VK_SLASH
      Constant for DOM_VK_SLASH.
      See Also:
    • DOM_VK_BACK_QUOTE

      public static final int DOM_VK_BACK_QUOTE
      Constant for DOM_VK_BACK_QUOTE.
      See Also:
    • DOM_VK_OPEN_BRACKET

      public static final int DOM_VK_OPEN_BRACKET
      Constant for DOM_VK_OPEN_BRACKET.
      See Also:
    • DOM_VK_BACK_SLASH

      public static final int DOM_VK_BACK_SLASH
      Constant for DOM_VK_BACK_SLASH.
      See Also:
    • DOM_VK_CLOSE_BRACKET

      public static final int DOM_VK_CLOSE_BRACKET
      Constant for DOM_VK_CLOSE_BRACKET.
      See Also:
    • DOM_VK_QUOTE

      public static final int DOM_VK_QUOTE
      Constant for DOM_VK_QUOTE.
      See Also:
    • DOM_VK_META

      public static final int DOM_VK_META
      Constant for DOM_VK_META.
      See Also:
    • DOM_VK_ALTGR

      public static final int DOM_VK_ALTGR
      Constant for DOM_VK_ALTGR.
      See Also:
    • DOM_VK_WIN_ICO_HELP

      public static final int DOM_VK_WIN_ICO_HELP
      Constant for DOM_VK_WIN_ICO_HELP.
      See Also:
    • DOM_VK_WIN_ICO_00

      public static final int DOM_VK_WIN_ICO_00
      Constant for DOM_VK_WIN_ICO_00.
      See Also:
    • DOM_VK_PROCESSKEY

      public static final int DOM_VK_PROCESSKEY
      Constant for DOM_VK_PROCESSKEY.
      See Also:
    • DOM_VK_WIN_ICO_CLEAR

      public static final int DOM_VK_WIN_ICO_CLEAR
      Constant for DOM_VK_WIN_ICO_CLEAR.
      See Also:
    • DOM_VK_WIN_OEM_RESET

      public static final int DOM_VK_WIN_OEM_RESET
      Constant for DOM_VK_WIN_OEM_RESET.
      See Also:
    • DOM_VK_WIN_OEM_JUMP

      public static final int DOM_VK_WIN_OEM_JUMP
      Constant for DOM_VK_WIN_OEM_JUMP.
      See Also:
    • DOM_VK_WIN_OEM_PA1

      public static final int DOM_VK_WIN_OEM_PA1
      Constant for DOM_VK_WIN_OEM_PA1.
      See Also:
    • DOM_VK_WIN_OEM_PA2

      public static final int DOM_VK_WIN_OEM_PA2
      Constant for DOM_VK_WIN_OEM_PA2.
      See Also:
    • DOM_VK_WIN_OEM_PA3

      public static final int DOM_VK_WIN_OEM_PA3
      Constant for DOM_VK_WIN_OEM_PA3.
      See Also:
    • DOM_VK_WIN_OEM_WSCTRL

      public static final int DOM_VK_WIN_OEM_WSCTRL
      Constant for DOM_VK_WIN_OEM_WSCTRL.
      See Also:
    • DOM_VK_WIN_OEM_CUSEL

      public static final int DOM_VK_WIN_OEM_CUSEL
      Constant for DOM_VK_WIN_OEM_CUSEL.
      See Also:
    • DOM_VK_WIN_OEM_ATTN

      public static final int DOM_VK_WIN_OEM_ATTN
      Constant for DOM_VK_WIN_OEM_ATTN.
      See Also:
    • DOM_VK_WIN_OEM_FINISH

      public static final int DOM_VK_WIN_OEM_FINISH
      Constant for DOM_VK_WIN_OEM_FINISH.
      See Also:
    • DOM_VK_WIN_OEM_COPY

      public static final int DOM_VK_WIN_OEM_COPY
      Constant for DOM_VK_WIN_OEM_COPY.
      See Also:
    • DOM_VK_WIN_OEM_AUTO

      public static final int DOM_VK_WIN_OEM_AUTO
      Constant for DOM_VK_WIN_OEM_AUTO.
      See Also:
    • DOM_VK_WIN_OEM_ENLW

      public static final int DOM_VK_WIN_OEM_ENLW
      Constant for DOM_VK_WIN_OEM_ENLW.
      See Also:
    • DOM_VK_WIN_OEM_BACKTAB

      public static final int DOM_VK_WIN_OEM_BACKTAB
      Constant for DOM_VK_WIN_OEM_BACKTAB.
      See Also:
    • DOM_VK_ATTN

      public static final int DOM_VK_ATTN
      Constant for DOM_VK_ATTN.
      See Also:
    • DOM_VK_CRSEL

      public static final int DOM_VK_CRSEL
      Constant for DOM_VK_CRSEL.
      See Also:
    • DOM_VK_EXSEL

      public static final int DOM_VK_EXSEL
      Constant for DOM_VK_EXSEL.
      See Also:
    • DOM_VK_EREOF

      public static final int DOM_VK_EREOF
      Constant for DOM_VK_EREOF.
      See Also:
    • DOM_VK_PLAY

      public static final int DOM_VK_PLAY
      Constant for DOM_VK_PLAY.
      See Also:
    • DOM_VK_ZOOM

      public static final int DOM_VK_ZOOM
      Constant for DOM_VK_ZOOM.
      See Also:
    • DOM_VK_PA1

      public static final int DOM_VK_PA1
      Constant for DOM_VK_PA1.
      See Also:
    • DOM_VK_WIN_OEM_CLEAR

      public static final int DOM_VK_WIN_OEM_CLEAR
      Constant for DOM_VK_WIN_OEM_CLEAR.
      See Also:
  • Constructor Details

    • KeyboardEvent

      public KeyboardEvent()
      Creates a new keyboard event instance.
    • KeyboardEvent

      public KeyboardEvent(DomNode domNode, String type, char character, boolean shiftKey, boolean ctrlKey, boolean altKey)
      Creates a new keyboard event instance for a character key.
      Parameters:
      domNode - the DOM node that triggered the event
      type - the event type
      character - the character associated with the event
      shiftKey - true if SHIFT is pressed
      ctrlKey - true if CTRL is pressed
      altKey - true if ALT is pressed
    • KeyboardEvent

      public KeyboardEvent(DomNode domNode, String type, int keyCode, boolean shiftKey, boolean ctrlKey, boolean altKey)
      Creates a new keyboard event instance for a key code.
      Parameters:
      domNode - the DOM node that triggered the event
      type - the event type
      keyCode - the key code associated with the event
      shiftKey - true if SHIFT is pressed
      ctrlKey - true if CTRL is pressed
      altKey - true if ALT is pressed
  • Method Details

    • isShiftNeeded

      public static boolean isShiftNeeded(char ch, boolean shiftKey)
      Returns whether the specified character requires the SHIFT key to be pressed.
      Parameters:
      ch - the character to check
      shiftKey - whether the shift key is currently pressed
      Returns:
      true if the character requires the SHIFT key
    • jsConstructor

      public void jsConstructor(String type, org.htmlunit.corejs.javascript.ScriptableObject details)
      Creates an instance of this event.
      Overrides:
      jsConstructor in class UIEvent
      Parameters:
      type - the event type
      details - the event details (optional)
    • initKeyboardEvent

      public void initKeyboardEvent(String type, boolean bubbles, boolean cancelable, Object view, String key, int location, boolean ctrlKey, boolean altKey, boolean shiftKey, boolean metaKey)
      Initializes the keyboard event using the DOM Level 3 Event specification.
      Parameters:
      type - the event type
      bubbles - whether the event can bubble
      cancelable - whether the event can be canceled
      view - the view to use for this event
      key - the value of the key attribute; defaults to ""
      location - the value of the location attribute; defaults to 0
      ctrlKey - whether the Control key is pressed
      altKey - whether the Alt key is pressed
      shiftKey - whether the Shift key is pressed
      metaKey - whether the Meta key is pressed
    • getCharCode

      public int getCharCode()
      Returns the char code associated with the event.
      Returns:
      the char code associated with the event
    • setCharCode

      protected void setCharCode(int charCode)
      Sets the char code associated with the event.
      Parameters:
      charCode - the char code associated with the event
    • getWhich

      public int getWhich()
      Returns the numeric key code of the key pressed, or the char code for an alphanumeric key pressed.
      Overrides:
      getWhich in class UIEvent
      Returns:
      the numeric key code or char code
    • setWhich

      protected void setWhich(int which)
      Sets the numeric key code of the key pressed, or the char code for an alphanumeric key pressed.
      Parameters:
      which - the key code or char code
    • getKeyCode

      public int getKeyCode()
      Returns the key code associated with the event. Overridden to modify browser configurations.
      Overrides:
      getKeyCode in class Event
      Returns:
      the key code associated with the event
    • isShiftKey

      public boolean isShiftKey()
      Returns whether the SHIFT key was pressed during this event.
      Overrides:
      isShiftKey in class Event
      Returns:
      true if SHIFT was pressed
    • isCtrlKey

      public boolean isCtrlKey()
      Returns whether the CTRL key was pressed during this event.
      Overrides:
      isCtrlKey in class Event
      Returns:
      true if CTRL was pressed
    • isAltKey

      public boolean isAltKey()
      Returns whether the ALT key was pressed during this event.
      Overrides:
      isAltKey in class Event
      Returns:
      true if ALT was pressed
    • getKey

      public String getKey()
      Returns the value of the key pressed by the user.
      Returns:
      the value of the key pressed
    • setKey

      protected void setKey(String key)
      Sets the value of the key pressed by the user.
      Parameters:
      key - the key value
    • getCode

      public String getCode()
      Returns the physical key identifier on the keyboard.
      Returns:
      the physical key identifier
    • setCode

      protected void setCode(String code)
      Sets the physical key identifier on the keyboard.
      Parameters:
      code - the physical key identifier
    • isMetaKey

      public boolean isMetaKey()
      Returns whether the meta key was pressed during the event.
      Returns:
      true if the meta key was pressed
    • setMetaKey

      protected void setMetaKey(boolean metaKey)
      Sets whether the meta key was pressed during the event.
      Parameters:
      metaKey - true if the meta key was pressed
    • getLocation

      public int getLocation()
      Returns the location of the key on the keyboard.
      Returns:
      the key location
    • setLocation

      protected void setLocation(int location)
      Sets the location of the key on the keyboard.
      Parameters:
      location - the key location
    • isRepeat

      public boolean isRepeat()
      Returns whether the key is being held down causing auto-repeat.
      Returns:
      true if the key is being held down
    • setRepeat

      protected void setRepeat(boolean repeat)
      Sets whether the key is being held down causing auto-repeat.
      Parameters:
      repeat - true if the key is being held down
    • getIsComposing

      public boolean getIsComposing()
      Returns whether this event is fired after the compositionstart and before the compositionend events.
      Returns:
      true if the event is fired while composing
    • setIsComposing

      protected void setIsComposing(boolean isComposing)
      Sets whether this event is fired after the compositionstart and before the compositionend events.
      Parameters:
      isComposing - true if the event is fired while composing