Commands: System Functions

It's possible to dynamically change the screen title text and action button labels. Setting an empty label to a button makes it look disabled. The buttons send ASCII 1-5 when clicked. Those changes are not retained after restart.

Single-byte commands & queries

CodeMeaning
_CAN_ (24) This ASCII code is sent by ESPTerm when it becomes ready to receive commands. When this code is received on the UART, it means ESPTerm has restarted and is ready. Use this to detect spontaneous restarts which require a full screen repaint. As a control character sent to ESPTerm, CAN aborts any currently received commands and clears the parser.
_ENQ_ (5) ESPTerm responds to this control characters with an "answerback message". This message contains the curretn version, unique ID, and the IP address if in Client mode.
`\e[5n` Query device status, ESPTerm replies with `\e[0n` "device is OK". Can be used to check if the terminal has booted up and is ready to receive commands.

Setting parameters

CodeMeaning
`\e[n q` Set cursor style: eg. `\e[3 q` (the space is part of the command!). 0~-~block~(blink), 1~-~default, 2~-~block~(steady), 3~-~underline~(blink), 4~-~underline~(steady), 5~-~I-bar~(blink), 6~-~I-bar~(steady). The default style (number 1) can be configured in Terminal Settings
`\e]0;t\a` Set screen title to _t_ (this is a standard OSC command)
`\e]27;1;u\a` Set background image to URL _u_ (including protocol) that can be resolved by the user's browser. The image will be scaled to fit the screen, preserving aspect ratio. A certain border must be added to account for the screen margins. Use empty string to disable the image feature. Note that this *won't work for users connected to the built-in AP*.
`\e]27;2;n\a` Set number of visible buttons to _n_ (0-5). To hide/show the entire buttons bar, use the dedicated hiding commands (see below)
\e]28;x;t\a Set label for button _x_ (1-5) to _t_ - e.g.`\e]28;1;Yes\a` sets the first button text to "Yes".
\e]29;x;m\a Set message for button _x_ (1-5) to _m_ - e.g.`\e]29;3;+\a` sets the 3rd button to send "+" when pressed. The message can be up to 10 bytes long.
\e]30;x;c\a Set button _x_ (1-5) color to _c_ - e.g.`\e]30;2;#00FF00\a` makes the 2nd button green. Supported are SGR colors 1-255 and TrueColor in the format `#RRGGBB`. Use 0 to reset to the default color.
\e[?800h \\ \e[?800l Show (`h`) or hide (`l`) the action buttons (the blue buttons under the screen).
\e[?801h \\ \e[?801l Show (`h`) or hide (`l`) menu/help links under the screen.
\e[?2004h \\ \e[?2004l Enable (`h`) or disable (`l`) Bracketed Paste mode. This mode makes any text sent using the Upload Tool be preceded by `\e[200\~` and terminated by `\e[201\~`. This is useful for distinguishing keyboard input from uploads.
\e[12h \\ \e[12l Enable (`h`) or disable (`l`) Send-Receive Mode (SRM). SRM is the opposite of Local Echo, meaning `\e[12h` disables and `\e[12l` enables Local Echo.

Other

CodeMeaning
\e]9;t\a Show a notification with text _t_. This will be either a desktop notification or a pop-up balloon.
\e[?ns \\ \e[?nr Save (`s`) and restore (`r`) any option set using `CSI ? n h`. This is used by some applications to back up the original state before making changes.