sending USB HID page 0xC key codes above 0xFF

Not open for further replies.


Active member
Hello! I have a Teensy 2 using the Arduino environment. I want to use it to send key codes to an Android device. Specifically, I want to send keycode 0x223 (Android calls it KEYCODE_HOME) under the Consumer page (0xC). I also want to send a bunch of other keycodes under the consumer page. I hacked the hid code to assign one byte in the input report to keys 0x0-0xFF and eight bits mapped to eight keycodes above 0xFF. Is there a better way of doing this?

Here's my code:

And my changes to the $ARDUINO_HOME/hardware/teensy/cores/usb_hid directory:
When sending to a windows machine, the bit-mapped keys above 0xFF (Search and Home in my case) work, but the bytecode ones (range 0x0-0xFF) do not work under windows (volume, play/pause/stop/ff/rev/skip)

It works under Android, however.
Not open for further replies.