---
title: "time.nextKey: Go to Next Keyframe or Marker — Motion kit command — Kition"
description: "Moves the current time to the next keyframe or marker visible in the timeline."
canonical: "https://developer.kition.ai/docs/kits/motion/commands/time.nextKey"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/motion/commands/time.nextKey](https://developer.kition.ai/docs/kits/motion/commands/time.nextKey)

# time.nextKey

**Go to Next Keyframe or Marker.** Moves the current time to the next keyframe or marker visible in the timeline.

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `layer` | `integer \| string` | no | read by the command beside its listed parameters |
| `prop` | `string` | no | read by the command beside its listed parameters |
| `to` | `string` | no | read by the command beside its listed parameters |
| `visible` | `object[]` | no | [{layer, prop}] (only these properties' keys, as the Timeline shows them); only these properties' keys, as the Timeline shows them |

## Call through motion_run

```text
motion_run {
  "path": "<file>.kmotion",
  "steps": [{ "command": "time.nextKey" }]
}
```

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

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `display` | `string` | no |  |
| `frame` | `integer` | no |  |
| `time` | `number` | no |  |

```json
{
  "additionalProperties": true,
  "properties": {
    "display": {
      "type": "string"
    },
    "frame": {
      "type": "integer"
    },
    "time": {
      "type": "number"
    }
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "layer": {
      "description": "read by the command beside its listed parameters",
      "oneOf": [
        {
          "description": "layer id as motion_inspect lists it (when no layer has that id, its 1-based stack position)",
          "type": "integer"
        },
        {
          "description": "layer id as receipts print it (\"51\"), a layer name, or #n for the n-th from the top",
          "type": "string"
        }
      ]
    },
    "prop": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "to": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "visible": {
      "description": "[{layer, prop}] (only these properties' keys, as the Timeline shows them); only these properties' keys, as the Timeline shows them",
      "items": {
        "additionalProperties": true,
        "properties": {
          "layer": {
            "oneOf": [
              {
                "description": "layer id as motion_inspect lists it (when no layer has that id, its 1-based stack position)",
                "type": "integer"
              },
              {
                "description": "layer id as receipts print it (\"51\"), a layer name, or #n for the n-th from the top",
                "type": "string"
              }
            ],
            "x-khp-name": "name",
            "x-khp-role": "object",
            "x-khp-types": [
              "Layer"
            ]
          },
          "prop": {}
        },
        "type": "object"
      },
      "type": "array"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/motion-darwin-arm64@0.1.0 and the kit itself (motion_commands through @kition/cli@0.1.1, built from KitionAI/kition-motion@4719aa7).
