# Before start, make sure you've killed all old tmux servers that
# could be still running in the background
sudo killall -9 tmux
# Remove any previous installation
sudo apt-get -y remove tmux
With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.
For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.
In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:
- Go to your computers/phones settings
- Ensure Bluetooth is turned on
Edit 2024-12-18:
Support for mouse emulation has now been implemented. See https://zmk.dev/docs/keymaps/behaviors/mouse-emulation
The instructions below are outdated.