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

# pressKey

Simulates pressing a single key on the keyboard.
Accepts key names from [KeyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values) like "Enter", "Backspace", "ArrowLeft", or single characters like "a", "5".
Example: `pressKey(key: "Enter")`
Returns true if the key press was successful.

## Definition

```graphql theme={null}
pressKey(
  key: String!
  options: PressKeyOptions
): Boolean!
```

## Arguments

### `key`

[String!](/reference/graphql/scalars/string)

The key to press. For a list of possible keys, refer to MDN documentation on [KeyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values).
Examples: `"a"`, `"Enter"`, `"F1"`, `"Control"`, `"Shift+A"` (modifiers are handled by 'options' or within the key string for some systems).
For combinations like Ctrl+C, usually use individual presses or type for text.

### `options`

[PressKeyOptions](/reference/graphql/inputs/press-key-options)

Options for the key press, such as delay.

## Returns

[Boolean!](/reference/graphql/scalars/boolean)

The `Boolean` scalar type represents `true` or `false`.
