# Press Key

Presses a key or a combination of keys

#### Key

* Name of key to press, such as `ArrowLeft`. See [USKeyboardLayout](https://github.com/puppeteer/puppeteer/blob/main/src/common/USKeyboardLayout.ts) for a list of all key names.
* Use the "Detect" button to have Browserflow detect and complete any key combination

#### Wait for new page to load

* If the key press will trigger a URL change (e.g. pressing `Enter` to submit a form), select this option to wait for the new page to load before proceeding

### Press Key vs. Click

If you have the choice between pressing a key or clicking to perform an action (e.g. pressing `Tab` to select an element or clicking on it), go with using [Click](/reference/browserflow-commands/interact-with-page/click.md) as it will properly wait for elements to load and therefore be more reliable compared to Press Key, which may press the key before the page can process it.

### OS-Level Keyboard Shortcuts

Note that OS-level shortcuts (e.g. `Command + V` to paste on Mac OS) won't work because these key presses are simulated at the browser level, not at the OS level (see [puppeteer#313](https://github.com/puppeteer/puppeteer/issues/1313) for a longer explanation)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.browserflow.app/reference/browserflow-commands/interact-with-page/press-key.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
