---
title: "text.caret: Move Caret — Scene kit command — Kition"
description: "Moves the caret in text edit mode by `by`, to `to`, or to a place (start, end, line start, …) and answers it."
canonical: "https://developer.kition.ai/docs/kits/scene/commands/text.caret"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/scene/commands/text.caret](https://developer.kition.ai/docs/kits/scene/commands/text.caret)

# text.caret

**Move Caret.** Moves the caret in text edit mode by `by`, to `to`, or to a place (start, end, line start, …) and answers it.

- Kit: Scene 0.1.0 (.kscene); reference: [Scene kit commands](https://developer.kition.ai/docs/kits/scene.md)
- Changes the document: no

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `by` | `integer` | no | Characters to move (negative: back) |
| `place` | `"start" \| "end" \| "lineStart" \| "lineEnd" \| "up" \| "down"` | no | A place to go |
| `to` | `integer` | no | A character index |

## Call through scene_run

```text
scene_run {
  "path": "<file>.kscene",
  "steps": [{ "command": "text.caret" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `by`, `place`, `to`. scene_run answers the step’s result in `completed[i].result`.

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `caret` | `any` | no |  |

```json
{
  "additionalProperties": true,
  "properties": {
    "caret": {}
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "by": {
      "description": "Characters to move (negative: back)",
      "type": "integer"
    },
    "place": {
      "description": "A place to go",
      "enum": [
        "start",
        "end",
        "lineStart",
        "lineEnd",
        "up",
        "down"
      ],
      "type": "string"
    },
    "to": {
      "description": "A character index",
      "type": "integer"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/scene-darwin-arm64@0.1.0 and the kit itself (scene_commands through @kition/cli@0.1.1, built from KitionAI/kition-scene@4d06faf).
