<!-- Source: https://medius.k4tech.net/native/commands/move -->
# Move

_Cursor motion and scroll_

[`MOVE`](/native/commands/move.md#move) drives a relative Axis: the cursor pair (X and Y together) or the wheel, picked by a `motion` byte. It injects on top of the real mouse, so the PC sees the combined result, and it's [fire-and-forget](/native/injection.md#fire-and-forget). The momentary inputs (buttons, keys, media) have their own verb, [`INJECT`](/native/commands/inject.md#inject).

| motion | Axis | carries | payload |
| --- | --- | --- | --- |
| `0` | [cursor](/native/commands/move.md#move) (X, Y) | `dx`, `dy` (i16) | 5 bytes |
| `1` | [wheel](/native/commands/move.md#wheel) | `dz` (i16) | 3 bytes |

## MOVE

_Relative axis injection_

`MOVE` shifts an axis by a relative amount, not a screen position. The `motion` byte at offset 0 selects the axis. [Opcode](/native/frame.md#opcodes) `0x01`.

```text
MOVE 0x01 · cursor payload 5 bytes
```

_Fire-and-forget_

#### PAYLOAD (cursor, motion = 0)

| Offset | Field | Type | Notes |
| --- | --- | --- | --- |
| 0 | `motion` | `u8` | `0` = cursor |
| 1 | `dx` | `i16` | horizontal step; +x = right, little-endian |
| 3 | `dy` | `i16` | vertical step; +y = down, little-endian |

#### GUARANTEES

```
exact   net move = the sum of every delta you send
range   full i16 per axis, no clamp
signs   +x right, +y down (screen-style), +z wheel up
paced   a large move drains across frames; nothing is dropped
```

The box carries any remainder in its [accumulator](/native/injection.md#state); [`RESET`](/native/commands/admin.md#reset) zeroes it. Library binding: [`move_rel`](/library/move.md#move-rel).

#### EXAMPLE

Cursor `dx = 100`, `dy = 0` (`motion = 0`):

```
+--------+--------+--------+--------+--------+--------+--------+--------+
| A5     | 01     | 00     | 05 00  | 00     | 64 00  | 00 00  | lo hi  |
+--------+--------+--------+--------+--------+--------+--------+--------+
| SOF    | TYPE   | SEQ    | LEN    | motion | dx     | dy     | CRC16  |
+--------+--------+--------+--------+--------+--------+--------+--------+
```

## MOVE (wheel)

_Vertical scroll_

With `motion = 1`, `MOVE` scrolls the wheel by a relative amount. Same opcode, a shorter payload.

```text
MOVE 0x01 · wheel payload 3 bytes
```

_Fire-and-forget_

#### PAYLOAD (wheel, motion = 1)

| Offset | Field | Type | Notes |
| --- | --- | --- | --- |
| 0 | `motion` | `u8` | `1` = wheel |
| 1 | `dz` | `i16` | scroll steps; + = up, - = down, little-endian |

#### EFFECT

The box adds `dz` into its [accumulator](/native/injection.md#state) and drains it across [frames](/native/frame.md) with carry, no clamp. [`RESET`](/native/commands/admin.md#reset) clears it. Library binding: [`wheel`](/library/move.md#wheel).

#### EXAMPLE

Wheel `dz = 1`, one step up (`motion = 1`):

```
+--------+--------+--------+--------+--------+--------+--------+
| A5     | 01     | 00     | 03 00  | 01     | 01 00  | lo hi  |
+--------+--------+--------+--------+--------+--------+--------+
| SOF    | TYPE   | SEQ    | LEN    | motion | dz     | CRC16  |
+--------+--------+--------+--------+--------+--------+--------+
```
