---
title: "MoveCursorCmd | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/MoveCursorCmd/"
---

# MoveCursorCmd

> The command to move the current cursor position.

## Classes

### MoveCursorCmd

#### Implements

- [`ICommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICommand.md#icommand)

#### Constructors

##### Constructor

```ts
new MoveCursorCmd(textManager, initData): MoveCursorCmd;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `textManager` | [`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager) |
| `initData` | [`MoveCursorCmdData`](#movecursorcmddata) |

###### Returns

[`MoveCursorCmd`](#movecursorcmd)

#### Methods

##### execute()

```ts
execute(): boolean;
```

Executes the command.

###### Returns

`boolean`

true if changes were made, false otherwise.

###### Implementation of

[`ICommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICommand.md#icommand).[`execute`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICommand.md#execute)

***

### MoveCursorCmdData

Data required to initialize the command.

#### Constructors

##### Constructor

```ts
new MoveCursorCmdData(direction, withSelection): MoveCursorCmdData;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `direction` | [`MoveDirectionType`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/MoveDirectionType.md#movedirectiontype) |
| `withSelection` | `boolean` |

###### Returns

[`MoveCursorCmdData`](#movecursorcmddata)

#### Properties

##### direction

```ts
direction: MoveDirectionType;
```

Direction of cursor movement.

##### withSelection

```ts
withSelection: boolean;
```

Indicates if the cursor moves with the selection.
