Skip to content

Commit 4ec3290

Browse files
authored
docs(api): replace select-all note with example (microsoft#3328)
1 parent 411c738 commit 4ec3290

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docs/api.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3309,14 +3309,20 @@ await page.keyboard.press('Backspace');
33093309
// Result text will end up saying 'Hello!'
33103310
```
33113311

3312-
An example of pressing `A`
3312+
An example of pressing uppercase `A`
33133313
```js
33143314
await page.keyboard.press('Shift+KeyA');
33153315
// or
33163316
await page.keyboard.press('Shift+A');
33173317
```
33183318

3319-
> **NOTE** On MacOS, keyboard shortcuts like `⌘ A` -> Select All do not work. See [#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)
3319+
An example to trigger select-all with the keyboard
3320+
```js
3321+
// on Windows and Linux
3322+
await page.keyboard.press('Control+A');
3323+
// on macOS
3324+
await page.keyboard.press('Meta+A');
3325+
```
33203326

33213327
<!-- GEN:toc -->
33223328
- [keyboard.down(key)](#keyboarddownkey)

0 commit comments

Comments
 (0)