Remapping HID for Fun and… Well Fun [Hackaday]

View Article on Hackaday

If you want to remap some mouse or keyboard keys, and you use Linux, it is easy. If you use Windows or another operating system, you can probably do that without too much trouble. But what if you use all of them? Or what if you don’t have access to the computer in question? Thanks to [jfedor2], you can reach for a Raspberry Pi Pico and make this handy key-and-mouse remapping hardware dongle.

But you can do more than just swapping control and caps lock because the software is pretty sophisticated. For instance, you can define layers like you might find in a custom keyboard setup — pressing one key can trigger a layer that redefines the functions of all of the other keys. There are programmable macros and a mechanism to differentiate between a key being tapped or held.

Since it also works with mice, you can trigger macros from mouse buttons, or remap your keyboard arrow keys to the mouse’s scroll wheel. And you can configure all of this from a web browser.

On the hardware side, the code supports several different off-the-shelf and custom boards. There’s also a nice enclosure to make it look like an off-the-shelf product. There are also serial and Bluetooth versions of the device, which map them to a USB HID connection.

This has applications for accessible devices. We can also envision it being useful with turnkey devices that you might want to customize without having to reverse-engineer the existing software. Because of the mouse/keyboard cross-functionality, this might have been just the ticket for resurrecting an old light pen, for instance. If you want to dive into the HID spec that makes this whole thing work, we can help with that. What will you do with it?



Leave a Reply