DocsUse
Safety and limits
What it means for a device to control your computer, how leases, emergency stop, the monitor screen, and the pairing key protect you, the assumptions for use, and what the project does not do.
What this means#
To the computer, Keyling is a real keyboard and mouse. The keystrokes it sends are indistinguishable from ones a person types:
- Keystrokes go to whatever window is in the foreground, whether or not it is the one you meant to control.
- Software on the computer cannot tell whether input comes from Keyling or from a person.
- Whoever can send commands to the device can control the computer.
The device is only responsible for executing on time. What to press and which window is in front are up to you, your macros, or your agent. The mechanisms below make sure that output is visible, can be stopped at any moment, and that the device lets go on its own when something goes wrong on the host.
Arming and leases#
Keyboard and mouse commands from the network are disarmed by default.
- You must arm before output. Arming is a lease of 1–600 seconds, 60 seconds by default.
- Arming again during a lease renews it.
- When the lease expires, the device clears the queue, releases all keys and mouse buttons, and disarms.
- If the host program crashes, the network drops, or the process is killed, nobody renews the lease, and within at most one lease period the device stops and lets go.
Apps on the device are a separate source. An app must declare the hid permission in its manifest to send output. When an app stops, errors, or is replaced, the device clears its queue and releases everything.
Emergency stop#


Pressing BOOT during output, or while armed, is an emergency stop.
- It takes effect the moment the button goes down. It doesn't wait for release or for gesture detection.
- It clears the queue, releases all keys and mouse buttons, and disarms.
- That press does not count as a click, does not count as allowing or denying a pairing, and does not enter Wi-Fi setup no matter how long you hold it.
After an emergency stop:
| Source | How to resume |
|---|---|
| Network source | The host arms again |
| App on the device | Press BOOT once more to restore the app's output access |
The host can also issue an emergency stop: stick hid-disarm, or POST /v1/hid/disarm. The device handles the request without waiting for the queue, so a network emergency stop always takes effect immediately; measured at about 22 ms in the middle of a long sequence.
Visible output#

| Indicator | Meaning |
|---|---|
| Keyboard icon in the status bar | The network source is armed |
| Amber border around the whole screen, indicator light steady amber | Output in progress |
| Left side of the monitor screen | Keyboard or mouse input the computer is receiving: keys down, modifiers, mouse buttons, pointer position and trail |
| Right side of the monitor screen | Who is in control, state, current step, progress, seconds left on the lease |
| Red stop panel | Why output stopped: BOOT emergency stop, host emergency stop, lease expired, USB disconnected |
The left side of the monitor screen only draws frames that have already been sent. An agent can use stick_monitor to write what it is doing on the right side.
Stuck keys on the computer#
If the device restarts, crashes, or is unplugged while holding keys down, the computer may keep thinking those keys are pressed. The device records which keys the computer sees as held: after reconnecting, it presses and releases them once more. Before a normal restart, it releases everything first.
Limits and rate limits#
- Host tools, MCP, and the SDK only accept the standard 87-key set (TKL) by default. F13–F24 and NumLock are reserved for self-tests and drills and must be enabled explicitly.
- Timeline frames are at least 4 ms apart.
- The queue holds up to 4096 items. A batch that doesn't fit is rejected as a whole.
Pairing key#
- Each device has one 32-byte pairing key. Apart from device info, getting a nonce, and requesting pairing, every control endpoint requires each request to be signed with it.
- Each request carries a one-time nonce that expires after 60 seconds and is invalidated once used, so requests cannot be replayed.
- Pairing requires a person to click BOOT on the device to allow it. If you can touch the device, you can pair with it.
- A pairing request shows the requester's name and a 4-digit number, valid for 30 seconds. The number lets you confirm that the request on the device is the one you started.
- Browsers, agents, and the command line all use the same key. Unpairing in a browser only deletes the copy stored there.
Where the key is stored:
| Client | Location |
|---|---|
| Browser | That browser's local storage |
| Command line and MCP installed from the device | ~/.esp-stick/secrets/devices.json |
| Command line and MCP run from the repository | The repository's secrets/devices.json |
To invalidate every key already handed out, write a new key to the device: pair again over the USB serial port (see The stick command line), or do a Clean install from the website, which erases all data on the device.
Assumptions for use#
Keyling is designed for a home LAN:
- Traffic between device and host is plain HTTP. Requests are signed, but content is not encrypted.
- The design does not account for eavesdropping on the LAN, or for a host that is already compromised.
- The device web app's pages, the device info endpoint, and the pairing request endpoint need no authentication, so anyone on the same LAN can reach them; but without someone pressing BOOT, they cannot get the key.
Therefore:
- Only use it on a LAN you trust. Do not expose the device's ports to the internet.
- Unplug the device when you are not using it.
- Anyone with access to the device can pair with it, and can reflash its firmware over USB. Keep the device as you would a key to this computer.
Firmware trust#
- Firmware updates over Wi-Fi must pass a signature check. The device only accepts images signed with the same key as the current firmware.
- The project does not burn eFuses and does not enable Secure Boot or flash encryption. The upside is that you can always reflash over USB and the board cannot get locked; the cost is that anyone with physical access can flash any firmware.
See Updates and recovery for details.
Wi-Fi passwords#
Host tools and agents never handle Wi-Fi passwords. Passwords are only entered by a person, on the setup page or in Settings in the device web app.
Not yet implemented#
Physical confirmation, an audit log of operations, and disabling keys at the firmware level are on the roadmap but not implemented yet.
What the project does not do#
- No in-game automation.
- The hardware layer does not imitate humans, recognize UI, or check the foreground window: those belong to the software-layer SDK and the agents that use it.
Use it responsibly#
- Only control computers you are authorized to control.
- Follow the terms of the software and services you use.
- Before letting an agent run, make sure the foreground window is the right one.
- Tell people around you: one press of BOOT stops it.