teensy 3 missing implementation for set_media

Status
Not open for further replies.

gregersrygg

New member
Hi,

I noticed the set_media function wasn't implemented for teensy 3. It's only missing a few lines of code to work, so why not add it? Found some old threads about Windows security issues, but it would't hurt anyone to add 4 lines so it works on other platforms :)

With this patch it works to send media keys on Android 4.x. (Haven't tested any other OSes)
https://github.com/gregersrygg/teen...082419418097bcd98dae6f672bbe0e8c8385bab.patch

Documentation wise, it would be nice to mention that set_media doesn't allow HID Usage IDs, but only works with these pre-defined keys: KEY_MEDIA_VOLUME_INC, KEY_MEDIA_VOLUME_DEC, KEY_MEDIA_MUTE, KEY_MEDIA_PLAY_PAUSE, KEY_MEDIA_NEXT_TRACK, KEY_MEDIA_PREV_TRACK, KEY_MEDIA_STOP, KEY_MEDIA_EJEC.

Thanks,
Gregers
 
I've merged this patch for the 1.17 release. I just tested on a Teensy3 and it's working very nicely with Rhythmbox on the Linux desktop.

I'm sorry this took so long. I saw this during 1.15. The Mini54 low power optimization (now released as 1.16) turned out to be LOT more challenging than I had originally anticipated. Once that was working well, I released 1.16 without this and a huge pile of other planned improvements. I'm catching up to so many little fixes and improvements for 1.17.... before I get pulled into the audio library for a couple months.
 
Last edited:
Hello, I've done a few small arduino projects, but nothing with Teensy, and had a couple of questions. I'm looking to use a Teensy 3 to do media control on an Andriod (tablet for now) device. Based on above it sounds like this may be possible. Is the media key command syntax the same as the standard keys? I didn't see the (media key) listed in the key list. Is the Teensyduino 1.17 available yet?
 
Just wanted to say thanks for this.
Ordered a Teensy 3 and finally got around to trying it.
Worked (controlled media (Google Music)) first time on an (first gen) Nexus 7 with an OTG cable.

Its mentioned in some of the document (like here) but I wanted to note it doesn't work on Windows, but does on Android and Linux (didn't try Mac) in case others stumble upon this thread.
 
Last edited:
Just wanted to say thanks for this.
Ordered a Teensy 3 and finally got around to trying it.
Worked (controlled media (Google Music)) first time on an (first gen) Nexus 7 with an OTG cable.

Its mentioned in some of the document (like here) but I wanted to note it doesn't work on Windows, but does on Android and Linux (didn't try Mac) in case others stumble upon this thread.

Has there been any update on the Windows portion of this? I'm very new to Teensy and I'm wanting to use the media key functions with my Teensy 2 for a project. I would of course like for it to work across all major OS including Windows 8.1
 
Has there been any update on the Windows portion of this? I'm very new to Teensy and I'm wanting to use the media key functions with my Teensy 2 for a project. I would of course like for it to work across all major OS including Windows 8.1

I would love to know if it has been fix too ! Anyone ?

Did try on Teensy 3.1 with teensyduino 1.19 and arduino 1.0.5 and it still not working !
 
Status
Not open for further replies.
Back
Top