Event args for KeyUp and KeyDown events.

Constructors

Accessors

  • get alt(): boolean
  • Gets a value indicating whether the ALT key was pressed.

    Returns boolean

  • get ctrl(): boolean
  • Gets a value indicating whether the CTRL key was pressed.

    Returns boolean

  • get defaultPrevented(): boolean
  • Gets whether the PreventDefault method was called.

    Returns boolean

  • get keyCode(): number
  • Gets the keyboard code for a KeyDown or KeyUp event.

    Returns number

  • get modifiers(): ModifierKeys
  • Gets the modifier flags for a KeyDown or KeyUp event. The flags indicate which combination of CTRL, SHIFT, and ALT keys was pressed.

    Returns ModifierKeys

  • get shift(): boolean
  • Gets a value indicating whether the SHIFT key was pressed.

    Returns boolean

Methods

  • Tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.

    Returns void

  • Prevent the event from bubbling up.

    Returns void