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

# Hold Key

> Hold a key down for a duration

## Description

Holds a key down for a specified duration in milliseconds. Useful for long-press interactions or triggering hold-based browser shortcuts.

## Authentication

Open-source deployments do not require authentication by default. If your server config enables `X-API-Key`, include that header with the request.

## Path Parameters

<ParamField path="id" type="string" required>
  The browser ID returned from Create Session.
</ParamField>

## Request Body

<ParamField body="key" type="string" required>
  The key to hold. Append the duration in milliseconds directly to the key name, e.g. `Backspace3000` holds Backspace for 3 seconds.
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the key was held successfully.
</ResponseField>

<ResponseField name="message" type="string">
  Confirmation message.
</ResponseField>

## Example

```bash theme={null}
curl -X POST http://localhost:8080/browsers/exc-b9534e98-c3ce-4d1b-9671-b563ac66adc3/hold-key/ \
  -H "Content-Type: application/json" \
  -d '{ "key": "Backspace3000" }'
```

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "message": "Key held successfully"
  }
  ```
</ResponseExample>
