feat: expose location and modifiers on before-input-event (#29850)

* feat: expose location and modifiers on before-input-event

* lint
This commit is contained in:
Jeremy Rose 2021-07-14 04:50:02 -07:00 committed by GitHub
parent 1897b14af3
commit 4d0475c9ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 84 additions and 19 deletions

View file

@ -449,6 +449,8 @@ Returns:
* `control` Boolean - Equivalent to [KeyboardEvent.controlKey][keyboardevent].
* `alt` Boolean - Equivalent to [KeyboardEvent.altKey][keyboardevent].
* `meta` Boolean - Equivalent to [KeyboardEvent.metaKey][keyboardevent].
* `location` Number - Equivalent to [KeyboardEvent.location][keyboardevent].
* `modifiers` String[] - See [InputEvent.modifiers](structures/input-event.md).
Emitted before dispatching the `keydown` and `keyup` events in the page.
Calling `event.preventDefault` will prevent the page `keydown`/`keyup` events