Skip to content

Commit

Permalink
chore(control-or-meta): mention in docs (#33338)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skn0tt authored Oct 29, 2024
1 parent 0df801d commit 0221f15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 24 deletions.
25 changes: 5 additions & 20 deletions docs/src/api/class-keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,38 +104,23 @@ await page.Keyboard.PressAsync("Shift+A");
An example to trigger select-all with the keyboard

```js
// on Windows and Linux
await page.keyboard.press('Control+A');
// on macOS
await page.keyboard.press('Meta+A');
await page.keyboard.press('ControlOrMeta+A');
```

```java
// on Windows and Linux
page.keyboard().press("Control+A");
// on macOS
page.keyboard().press("Meta+A");
page.keyboard().press("ControlOrMeta+A");
```

```python async
# on windows and linux
await page.keyboard.press("Control+A")
# on mac_os
await page.keyboard.press("Meta+A")
await page.keyboard.press("ControlOrMeta+A")
```

```python sync
# on windows and linux
page.keyboard.press("Control+A")
# on mac_os
page.keyboard.press("Meta+A")
page.keyboard.press("ControlOrMeta+A")
```

```csharp
// on Windows and Linux
await page.Keyboard.PressAsync("Control+A");
// on macOS
await page.Keyboard.PressAsync("Meta+A");
await page.Keyboard.PressAsync("ControlOrMeta+A");
```

## async method: Keyboard.down
Expand Down
5 changes: 1 addition & 4 deletions packages/playwright-core/types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19819,10 +19819,7 @@ export interface FrameLocator {
* An example to trigger select-all with the keyboard
*
* ```js
* // on Windows and Linux
* await page.keyboard.press('Control+A');
* // on macOS
* await page.keyboard.press('Meta+A');
* await page.keyboard.press('ControlOrMeta+A');
* ```
*
*/
Expand Down

0 comments on commit 0221f15

Please sign in to comment.