Allow a Computer to mimic a Bluetooth Keyboard (& Mouse). Using some hardware (a couple of different options currently) and a piece of software running on the 'Server' machine - any devices which support Bluetooth LE HID can then receive the keystrokes. For full documentation (and updated docs!) see https://docs.acecentre.org.uk/products/v/relaykeys/
Well a range of purposes. For some - its just a convenient way of saving some money on a KVM switch - or replacing now hard to find commercial solutions.
For the AceCentre we want people with disabilities who are forced to use one system (e.g. a dedicated Eyegaze system) to be able to access other computers and systems they may need to use for work or leisure. This has only been available on a couple of commercial AAC systems - and often need to be on the same network which is sadly often impossible in schools or government workplaces - Or they do work over bluetooth but for only one system in the field exists like this (see here for more details on these). Some people may also want to jyst control their tablet or phone using this technique rather than rely on computer control functions - for example to control music software or photo editing software which usually demands the full screen. Or others want to make custom full screen custom keyboards using their specialist software.
Why not just rely on other solutions? Some commercial solutions are great. We advocate using them over our solution when you can. When you can't (e.g. no alternative or restrictions to what devices you can control) then this may be a solution.
We are a commercial developer.. I like it but I think I could do it differently. Thats great! But please consider the end user. If you as a commercial supplier dont want to continue making this hardware/software solution in the future consider a route to how a user could use a open solution. Please consider either replicating our command set at a serial or CLI level. Are we missing something that your solution provides? Please let us know so we can improve it.
Why not just do this in software alone? Sure. If you can. On windows - its not possible.. Yet. Maybe in Windows 11. In MacOS it should be - and iOS & Android its definitely possible. But our solution kind of offloads the problem. If you work in one of the mobile environments and want to replicate the functionality go for it - just please consider following some similarity in command structure (take a look at the macros for example)
If you are a developer start here. If you are an end user who just wants to get going start here.
RelayKeys is written in Go. The host software consists of a daemon (background service) and a CLI client.
# Clone the repository
git clone https://github.com/AceCentre/RelayKeys.git
cd RelayKeys
# Build (Windows)
powershell -ExecutionPolicy Bypass -File build-go.ps1
# Or build manually
go build -o relaykeys-daemon.exe ./cmd/relaykeys-daemon
go build -o relaykeys-cli.exe ./cmd/relaykeys-cli
# Run tests
go test ./... -count=1
# Cross-compile (macOS/Linux from any platform)
bash build-go.sh| Component | Description |
|---|---|
cmd/relaykeys-daemon/ |
Background service — serial, RPC, web UI, Windows service support |
cmd/relaykeys-cli/ |
CLI client — used by AAC software (Grid 3, Communicator 5, etc.) |
internal/blehid/ |
AT command protocol over serial + HID keycode map |
internal/config/ |
INI config loading |
internal/keymap/ |
JSON keymap loading (US, UK, DE, FR, ES, IT) |
internal/macro/ |
Macro save/load/record/replay |
internal/rpc/ |
JSON-RPC server (port 5383) + client |
internal/serial/ |
Hardware serial via go.bug.st/serial, auto-detect by VID/PID |
internal/simulator/ |
Full firmware simulator for testing |
internal/webui/ |
Embedded web UI + WebSocket hub |
The daemon listens on 127.0.0.1:5383 for JSON-RPC over HTTP, serves a web UI at /ui/, and communicates with the nRF52840 dongle via AT commands over serial at 115200 baud.
relaykeys-cli "type:Hello World" # Type text on target BLE device
relaykeys-cli "keypress:ENTER" # Press a key
relaykeys-cli "keypress:H,LMETA" # Win+H (modifier)
relaykeys-cli "mousemove:100,100" # Move mouse
relaykeys-cli "mousebutton:l,click" # Left click
relaykeys-cli "ble_cmd:devlist" # List paired BLE devices
relaykeys-cli "ble_cmd:devadd" # Enter pairing mode
relaykeys-cli -f macrofile.txt # Run macro fileThis project is licensed under the MIT License - see the LICENSE.md file for details
- bbx10 on the Adafruit forums who got this up and running. Awesome.
- Keyboard by Atif Arshad from the Noun Project
- Bluetooth by Adrien Coquet from the Noun Project
