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

# Press key

> Press a single key or a key combination like ctrl+c.

Presses a key or key combination. Pass modifiers joined with `+` (for example `ctrl+shift+t`).

## Path parameters

<ParamField path="id" type="string" required>
  Computer ID (UUID).
</ParamField>

## Body parameters

<ParamField body="key" type="string" required>
  Key or key combination to press.
</ParamField>

### Common keys

| Key                           | Description      |
| ----------------------------- | ---------------- |
| `Enter`                       | Enter/Return key |
| `Tab`                         | Tab key          |
| `Escape`                      | Escape key       |
| `Backspace`                   | Backspace key    |
| `Delete`                      | Delete key       |
| `Up`, `Down`, `Left`, `Right` | Arrow keys       |
| `Home`, `End`                 | Home/End keys    |
| `Page_Up`, `Page_Down`        | Page navigation  |
| `F1`-`F12`                    | Function keys    |

### Common combinations

| Combination    | Description       |
| -------------- | ----------------- |
| `ctrl+c`       | Copy              |
| `ctrl+v`       | Paste             |
| `ctrl+a`       | Select all        |
| `ctrl+s`       | Save              |
| `alt+Tab`      | Switch windows    |
| `alt+F4`       | Close window      |
| `ctrl+shift+t` | Reopen closed tab |

## Response

<ResponseField name="success" type="boolean">
  `true` if the key was pressed.
</ResponseField>

<ResponseField name="action" type="string">
  Always `key_press`.
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  # Press Enter
  curl -X POST https://www.orgo.ai/api/computers/a3bb189e-8bf9-3888-9912-ace4e6543002/key \
    -H "Authorization: Bearer $ORGO_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"key": "Enter"}'

  # Ctrl+C
  curl -X POST https://www.orgo.ai/api/computers/a3bb189e-8bf9-3888-9912-ace4e6543002/key \
    -H "Authorization: Bearer $ORGO_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"key": "ctrl+c"}'
  ```

  ```python Python theme={null}
  import requests

  # Press Enter
  requests.post(
      f"https://www.orgo.ai/api/computers/{computer_id}/key",
      headers={"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"},
      json={"key": "Enter"}
  )

  # Ctrl+C
  requests.post(
      f"https://www.orgo.ai/api/computers/{computer_id}/key",
      headers={"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"},
      json={"key": "ctrl+c"}
  )
  ```

  ```javascript JavaScript theme={null}
  // Press Enter
  await fetch(`https://www.orgo.ai/api/computers/${computerId}/key`, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${apiKey}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ key: 'Enter' })
  });

  // Ctrl+C
  await fetch(`https://www.orgo.ai/api/computers/${computerId}/key`, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${apiKey}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ key: 'ctrl+c' })
  });
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "success": true,
  "action": "key_press",
  "details": { "key": "Enter" }
}
```

## Errors

| Status | Meaning                                            |
| ------ | -------------------------------------------------- |
| `400`  | Missing `key`, or computer instance not available. |
| `401`  | Missing or invalid API key.                        |
| `403`  | You do not have access to this computer.           |
| `404`  | Computer not found.                                |
| `500`  | Upstream desktop agent failure.                    |


## OpenAPI

````yaml POST /computers/{id}/key
openapi: 3.1.0
info:
  title: Orgo API
  description: >-
    Launch cloud computers that AI agents can control and interact with. Create
    workspaces, provision computers, and control them programmatically.
  version: 2.0.0
  contact:
    name: Orgo Support
    email: spencer@orgo.ai
    url: https://orgo.ai
servers:
  - url: https://www.orgo.ai/api
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Organize computers into named workspaces
  - name: Computers
    description: Provision and manage virtual computers
  - name: Computer Lifecycle
    description: Start, stop, and restart computers
  - name: Computer Actions
    description: Control mouse, keyboard, and execute commands
  - name: Streaming
    description: Stream computer display via RTMP
  - name: Files
    description: Upload and download files
  - name: Templates
    description: Author, build, and launch reproducible computers from templates
paths:
  /computers/{id}/key:
    post:
      tags:
        - Computer Actions
      summary: Press key
      description: Presses a key or key combination (e.g., Enter, Tab, ctrl+c).
      operationId: pressKey
      parameters:
        - name: id
          in: path
          required: true
          description: Computer ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyRequest'
            examples:
              enter:
                summary: Press Enter
                value:
                  key: Enter
              shortcut:
                summary: Ctrl+C shortcut
                value:
                  key: ctrl+c
      responses:
        '200':
          description: Key pressed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    KeyRequest:
      type: object
      required:
        - key
      properties:
        key:
          type: string
          description: Key or key combination (e.g., Enter, Tab, ctrl+c, alt+F4)
          example: Enter
    ActionResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
  responses:
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid API key
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Resource not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication. Get your key at orgo.ai/workspaces

````