Keybow - adding HID codes for media keys


#1

Hello ya’ll,

I’ve been trying, and failing, to have keys on the Keybow act as media keys (such as Play/Pause, Forward, etc.).

Using https://source.android.com/devices/input/keyboard-devices for reference, I’ve defined the HID codes for the media keys I want in the keybow.lua file as such:

keybow.MUTE = 0x7f
keybow.VOLUMEUP = 0x80
keybow.VOLUMEDOWN = 0x81
keybow.MEDIA_PLAYPAUSE = 0xe8
keybow.MEDIA_PREVIOUSSONG = 0xea
[...etc]

and then just use them like any of the pre-defined keycodes.

However, this does not work, upon keypress nothing happens.
Any other keys still work normally and the Keybow does not freeze up either.

At this point I am not sure where the problem lies, I’d much appreciate any help :)

edit: Is there perhaps any way to get debug output from the Keybow?


#2

At least some of the multimedia HID keycodes work at this time work for Keybow only on Linux, and thus Android devices. Microsoft Windows ignores them for the HID profile as currently used by Keybow. There seems to be some work going on to get the multimedia keycodes also working on Windows, but this requires supporting another HID profile; please see the Keybow github repo issues for details.