Skip to content

Commit 8065c72

Browse files
committed
Clarify press key input format
1 parent a4b3d10 commit 8065c72

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,10 +478,12 @@ Destinations are the OTLP/HTTP endpoints sessions export to, managed per project
478478

479479
- `kernel browsers computer press-key <id>` - Press one or more keys
480480

481-
- `--key <key>` - Key symbols to press (repeatable)
481+
- `--key <key>` - One X11 keysym or chord, such as `Return`, `Ctrl+t`, or `Ctrl+minus` (repeatable)
482482
- `--duration <ms>` - Duration to hold keys down in ms (0=tap)
483483
- `--hold-key <key>` - Modifier keys to hold (repeatable)
484484

485+
Pass sequential or repeated key presses as separate `--key` values, for example `--key BackSpace --key BackSpace`. Use `computer type --text` to enter text instead of passing text to `press-key`.
486+
485487
- `kernel browsers computer scroll <id>` - Scroll the mouse wheel
486488

487489
- `--x <coordinate>` - X coordinate (required)

cmd/browsers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2879,7 +2879,7 @@ func init() {
28792879

28802880
// computer press-key
28812881
computerPressKey := &cobra.Command{Use: "press-key <id>", Short: "Press one or more keys", Args: cobra.ExactArgs(1), RunE: runBrowsersComputerPressKey}
2882-
computerPressKey.Flags().StringSlice("key", []string{}, "Key symbols to press (repeatable)")
2882+
computerPressKey.Flags().StringSlice("key", []string{}, "One X11 keysym or chord per value, e.g. Return, Ctrl+t, or Ctrl+minus (repeatable)")
28832883
_ = computerPressKey.MarkFlagRequired("key")
28842884
computerPressKey.Flags().Int64("duration", 0, "Duration to hold keys down in ms (0=tap)")
28852885
computerPressKey.Flags().StringSlice("hold-key", []string{}, "Modifier keys to hold (repeatable)")

0 commit comments

Comments
 (0)