Raspberry Pi Adapter Sends Keyboard Input From iPad via HID to Devices

Raspberry Pi
(Image credit: Canatee)

Raspberry Pis have proven to be incredibly adaptive boards so it's no surprise when you see them turning up now and again as adapters. They can easily be used to bridge connections between devices with notable versatility. Today we have another cool adapter to share, this one created by a maker who goes by Canatee over at Reddit. Using two Raspberry Pis, Canatee is able to send text from an iPad using HID as if it were a USB keyboard.

The idea stemmed, as many do, from a need to solve a problem. In this case, Canatee regularly helps students by giving feedback on their writing. Instead of typing out common phrases over and over again on their individual devices, this setup allows them to connect the Raspberry Pi Pico and send pre-written messages instantly as if they were typed on a USB keyboard.

Canatee set up a library of feedback that can be pulled using shortcuts. When a specific message needs to be added, a shortcut is used to instantly copy the information and inject the text. With the new Raspberry Pi setup, a Pi Zero is used to receive the shortcut information which then parses it to the Pico that serves as an HID USB interface.

The Raspberry Pi Zero receives its power via USB C which is connected to the iPad. The Pi Zero runs a Flask server which is programmed to filter out any characters the Pico side doesn’t recognize. When a shortcut is triggered, it parses from the iPad to the Pi Zero which then prepares it for transmission to the Pico.

The Pico receives messages from the Pi Zero via UART. The Pico can be connected to any device that supports USB keyboards from smartphones to laptops and tablets. The copied text is transmitted to the device just as it would be were the message typed out manually. According to Canatee, the code for the project was written using CircuitPython. However, no plans are in place to release the code at this time.

If you want to create a similar Raspberry Pi project, check out the original thread over at Reddit to get a better idea of how this one goes together and see it in action.

Ash Hill
Freelance News and Features Writer

Ash Hill is a Freelance News and Features Writer with a wealth of experience in the hobby electronics, 3D printing and PCs. She manages the Pi projects of the month and much of our daily Raspberry Pi reporting while also finding the best coupons and deals on all tech.