> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# press

> Press a key or key combination.

Issues a single key press. Use `+` to combine modifiers, e.g. `Meta+Enter`,
`Control+Shift+P`.

## Parameters

| Parameter     | Type      | Required | Description                                                           |
| ------------- | --------- | -------- | --------------------------------------------------------------------- |
| `key`         | `string`  | Yes      | Key name or chord (e.g. `Enter`, `Meta+Enter`).                       |
| `repeat`      | `number`  | No       | Number of times to repeat the press.                                  |
| `delay`       | `number`  | No       | Milliseconds between key down and key up.                             |
| `convertMeta` | `boolean` | No       | Translate `Meta` to `Control` on non-mac platforms.                   |
| `saveAs`      | `string`  | No       | Name of the variable to write this step's return value to.            |
| `retries`     | `number`  | No       | Number of times to retry the step on failure before failing the test. |
| `skipped`     | `boolean` | No       | Skip this step at execution time.                                     |

## Shorthand

Key name as a single string.

```yaml theme={null}
- press: Enter
```

## Examples

```yaml theme={null}
- press:
    key: Meta+Shift+Enter
```

```yaml theme={null}
- press:
    key: Control+Shift+Enter
    convertMeta: true
```

```yaml theme={null}
- press:
    key: ArrowDown
    repeat: 3
```

## Related

* [Test format](/core-concepts/test-format)
