IPhone Becomes A Bluetooth Keyboard And Mouse

Sometimes you need to use a computer and you don’t have a spare keyboard and mouse on hand. [KoStard] figured an iPhone could serve as a passable replacement interface device. To that end, he built an adapter to let the phone act as a wireless keyboard and mouse on just about any modern machine.

To achieve this, [KoStard] grabbed an ESP32-S3 development board, and programmed it to act as a USB HID device to any machine attached over USB. It then listens out for Bluetooth LE communications from an iPhone equipped with the companion app. The app provides an on-screen keyboard on the iPhone that covers everything including special keys, symbols, and punctuation. You can also take advantage of the iPhone’s quality capacitive touchscreen, which emulates a nicely-responsive  trackpad, with two-finger taps used for right clicking and two-finger drags for scroll. Latency is nice and low courtesy of the direct Bluetooth LE connection.

It’s a nifty build that is particularly useful in oddball situations where you might want a keyboard and mouse. For example, [KoStard] notes it’s a great way to control a Smart TV without having to do ugly slow “typing” on an infrared remote. We’ve seen his work before, too—previously building an adapter to provide Bluetooth capability to any old USB keyboard. Video after the break.

18 thoughts on “IPhone Becomes A Bluetooth Keyboard And Mouse

    1. Exactly. Just use the BLE of the Iphone to send out HID events. It´s like pressing a button on the robotic finger that presses the switch. Useless, convoluted, but presented here as if it was a “solution”
      The ineptitude of some writers here never cease to dismay…

      1. No, “Air Mouse” (not “Airmouse”) also worked on Windows. That was 15 years ago. Do you think the target system is a limitation if someone develops new apps anyway? Besides that, the video demo is on a Mac. An irony of fate!

  1. Surprised seeing all of the comments about apps doing the same thing when this project has the huge benefit of not needing a companion application on the target device – that’s huge for compatibility (and in my experience, avoiding signups or “bonus” context menu entries and other bloat).

  2. I have a couple old oculus go headsets someone gave me, both need the controller and my first thought was gee there should be a app you can run on an old smartphone. If someone out there is board and looking for a project…

  3. As some have mentioned, the advantage of this approach over just using bluetooth HID is that the target doesn’t need to support bluetooth (and you don’t need any access to the target to do the pairing).

    I just did a similar thing by mashing an ESP32-C3 mini together with a CH9329 UART-USB HID dongle together. An ESP32-S3 would probably be simpler, and require no soldering, as well as being more flexible.

    This is not a new idea, of course. I have recollections of a Cambridge Silicon Radio USB-Bluetooth dongle that could be reflashed with firmware to act as a keyboard, so you could pair a bluetooth keyboard with the dongle to access pre-boot environments (BIOS, etc), or drive the dongle from a phone, etc.

    This blog post (https://www.0xf8.org/2014/02/the-crux-of-finding-a-hid-proxy-capable-usb-bluetooth-adapter/) gives some more history (2003!), and details.

Leave a Reply to ImanCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.