mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
Simplify keyboard modifiers handling (#129)
This commit is contained in:
committed by
Andrey Lushnikov
parent
0007809305
commit
eca0d7fe53
10
docs/api.md
10
docs/api.md
@@ -63,7 +63,6 @@
|
||||
+ [page.waitForSelector(selector[, options])](#pagewaitforselectorselector-options)
|
||||
* [class: Keyboard](#class-keyboard)
|
||||
+ [keyboard.down(key[, options])](#keyboarddownkey-options)
|
||||
+ [keyboard.modifiers()](#keyboardmodifiers)
|
||||
+ [keyboard.sendCharacter(char)](#keyboardsendcharacterchar)
|
||||
+ [keyboard.up(key)](#keyboardupkey)
|
||||
* [class: Mouse](#class-mouse)
|
||||
@@ -662,15 +661,6 @@ This will not send input events unless `text` is specified.
|
||||
|
||||
If `key` is a modifier key, `Shift`, `Meta`, `Control`, or `Alt`, subsequent key presses will be sent with that modifier active. To release the modifier key, use [`keyboard.up`](#keyboardupkey).
|
||||
|
||||
#### keyboard.modifiers()
|
||||
- returns: <[Object]>
|
||||
- `Shift` <[boolean]>
|
||||
- `Meta` <[boolean]>
|
||||
- `Control` <[boolean]>
|
||||
- `Alt` <[boolean]>
|
||||
|
||||
Returns which modifier keys are currently active. Use [`keyboard.down`](#keyboarddownkey) to activate a modifier key.
|
||||
|
||||
#### keyboard.sendCharacter(char)
|
||||
- `char` <[string]> Character to send into the page.
|
||||
- returns: <[Promise]>
|
||||
|
||||
Reference in New Issue
Block a user