[BRLTTY] btkey: your Linux console as a Bluetooth keyboard for a phone

Nicolas Pitre nico at fluxnic.net
Thu Sep 3 16:47:32 UTC 2026


Hello,

Are you often switching between your phone and your Linux system, and 
having to type a lot on the touchscreen keyboard, or to keep an extra 
Bluetooth keyboard on your desk?  If you are like me, your full size 
desktop keyboard is the most comfortable to use, and the fastest too. 
Have you ever wondered how nice it would be to use it in the Android or 
iOS environment?

Here is btkey, which turns a Linux text console into a Bluetooth 
keyboard for a phone or tablet.

Run it on a spare virtual terminal.  While that VT is in the foreground, 
every keystroke goes to the paired phone instead of to Linux.  Switch 
away with Alt+Fn and the keyboard is Linux's again; switch back and 
forwarding resumes.  The foreground VT is the on/off switch, so there is 
no mode to remember and nothing to toggle.

The phone sees a standard Bluetooth HID keyboard, so on iOS everything a 
real keyboard does works, VoiceOver's Ctrl+Option chords included.

Of particular interest here: typing on the braille display's own 
keyboard reaches the phone too, and btkey is built to coexist with 
BRLTTY rather than compete with it for the keyboard.  Where BRLTTY has 
grabbed a keyboard to put braille commands on it, btkey takes the uinput 
keyboard BRLTTY publishes instead, so both keep working.  Text pasted on 
the Linux side is typed across as well.

btkey can also advertise the machine as a Bluetooth speaker, so the 
phone's audio comes out of the PC.  That is off by default and needs the 
PC's own Bluetooth audio set up, which the documentation covers.  It is 
good for music; for VoiceOver speech the lag may or may not bother you.

It needs root, a Bluetooth Classic controller, and a real text console: 
not ssh, not tmux, not a terminal emulator.

  https://github.com/npitre/btkey

Early days, version 0.1.5, and feedback is very welcome, especially from 
anyone pairing with Android, which it has had far less testing against 
than iOS.


Nicolas


More information about the BRLTTY mailing list