How to implement an "inline" USB keyboard data modifier

Status
Not open for further replies.

timg11

Member
I have a Microsoft Media keyboard that has a number of unused special-purpose keys.
I also have a KVM that has an annoyingly long 6 step hotkey sequence to simply change ports.

I want to build an inline Teensy device that will simply pass through all data from a USB keyboard, except for the scancodes of those few special purpose keys that will be remapped to the KVM hotkey sequence.

What is the best approach?

I saw the "Keyboard Redneckifier" at https://www.pjrc.com/teensy/projects.html, but unfortunately there is nothing there but photos.

I found good examples here http://pjrc.com/teensy/usb_keyboard.html of the code to look like a keyboard when plugged into a computer, but I have not found examples of the code that will receive the data from an attached keyboard. Luke Valenty appears to have accomplished that with some type of attachment, but there are no details.
 
I think the original project used something like:
https://www.pjrc.com/teensy/td_libs_USBHostShield.html and related libraries
USB host mode is non trivial, and may make it's way into the upcoming more capable Teensy but is still very much a work in progress. And no idea if either option can read the media keys either. A less software oriented approach would be to use a USB hub and a Teensy + buttons set to just inject the custom key sequence that way. No where near as elegant though.
 
Status
Not open for further replies.
Back
Top