detect key press for media consumer keys
They [key] and [keyup] objects don't detect the multimedia keys (ie. play, pause, rewind, skip, volume, etc...) in Max. Those sorts of keys are called "consumer keys," according to a guide I found on Universal Serial Bus HID Usage, in section 0x0C https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf. How can I use Max to detect input from those keys?
Have you tried using the [hi] object and using the keyboard as the input device. That should work - I just tested and I was able to get values for those keys.
Hi Dan, I'm not an expert in this area, but my experience has been that [hi] is much better than [key] and [keyup] at getting raw messages from the keyboard. It seems to be unaffected by what I assume is OS stuff, e.g. caps lock is a normal momentary switch rather than a toggle and the duplicated modifier keys send different numbers rather than the same. So maybe it'd solve your problem?
@Testcase, could you please post the patch that you used to get values from the consumer keys? I can't figure out how to get any values from my keyboard with the [hi] object.
(also I'm new to forums like this... How do I tag/reply to another user?)
As far as I remember, windows OS does not allow keyboard and mouse
to be used as HID devices, means such gadgets will NOT work with max hi object.
on OSX just use a message to capture the input