# Commands and Keybindings

## Serial Commands

<table id="bkmrk-keycommand-sentdescr"><colgroup><col></col><col></col><col></col></colgroup><tbody><tr><th>Key

</th><th>Command sent

</th><th>Description

</th></tr><tr><td>`<span class="editor-theme-code">1</span>`

</td><td>`<span class="editor-theme-code">speed <erpm></span>`

</td><td>Sets motor speed to current erpm value

</td></tr><tr><td>`<span class="editor-theme-code">2</span>`

</td><td>`<span class="editor-theme-code">stop</span>`

</td><td>Sends stop command

</td></tr><tr><td>`<span class="editor-theme-code">3</span>`

</td><td>`<span class="editor-theme-code">profile <erpm> <max_accel> <time_ms></span>`

</td><td>Sends full motion profile

</td></tr><tr><td>`<span class="editor-theme-code">b</span>`

</td><td>**(PIO subprocess)**

</td><td><span style="white-space: pre-wrap;">Runs </span>

`<span class="editor-theme-code">pio run -t <target> -e <env></span>`

<span style="white-space: pre-wrap;"> in background</span>

</td></tr><tr><td>`<span class="editor-theme-code">q</span>`

</td><td>**(none)**

</td><td>Quits the TUI and closes the serial port

</td></tr></tbody></table>

## Parameter Edit Keys

<table id="bkmrk-keyfieldvalidationee"><colgroup><col></col><col></col><col></col></colgroup><tbody><tr><th>Key

</th><th>Field

</th><th>Validation

</th></tr><tr><td>`<span class="editor-theme-code">e</span>`

</td><td>erpm

</td><td>Must be integer (negative allowed)

</td></tr><tr><td>`<span class="editor-theme-code">a</span>`

</td><td>accel

</td><td>Must be integer (negative allowed)

</td></tr><tr><td>`<span class="editor-theme-code">t</span>`

</td><td>time\_ms

</td><td>Must be integer (negative allowed)

</td></tr><tr><td>`<span class="editor-theme-code">p</span>`

</td><td>pio target

</td><td>Any non-empty string

</td></tr><tr><td>`<span class="editor-theme-code">n</span>`

</td><td>pio env

</td><td>Any non-empty string

</td></tr></tbody></table>

## Edit Mode Behaviour

<span style="white-space: pre-wrap;">Pressing an edit key switches the status bar to an edit prompt and opens an inline text field on the parameter row. </span>**Enter**<span style="white-space: pre-wrap;"> confirms; </span>**ESC**<span style="white-space: pre-wrap;"> restores the previous value. Invalid integer inputs are rejected and logged to the TX log with a </span>`<span class="editor-theme-code">!!</span>`<span style="white-space: pre-wrap;"> prefix — the parameter retains its prior value.</span>

## PIO Build

<span style="white-space: pre-wrap;">Pressing </span>`<span class="editor-theme-code">b</span>`<span style="white-space: pre-wrap;"> spawns a background thread running:</span>

```
pio run -t <pio_target> -e <pio_env>
```

<span style="white-space: pre-wrap;">Output streams line-by-line into the INCOMING panel. </span>`<span class="editor-theme-code">[INFO] PIO: done (exit 0)</span>`<span style="white-space: pre-wrap;"> appears on success. </span>`<span class="editor-theme-code">[ERROR] PIO: 'pio' not found in PATH</span>`<span style="white-space: pre-wrap;"> appears if PlatformIO is not installed. </span>

\--- Page 4 — Usage

<span style="white-space: pre-wrap;">Output streams line-by-line into the INCOMING panel. </span>`<span class="editor-theme-code">[INFO] PIO: done (exit 0)</span>`<span style="white-space: pre-wrap;"> appears on success. </span>`<span class="editor-theme-code">[ERROR] PIO: 'pio' not found in PATH</span>`<span style="white-space: pre-wrap;"> appears if PlatformIO is not installed.</span>