Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 9 of 9

Thread: teensy 3 missing implementation for set_media

  1. #1
    Junior Member
    Join Date
    Sep 2013
    Location
    Oslo, Norway
    Posts
    3

    teensy 3 missing implementation for set_media

    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/teens...c8385bab.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

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,576
    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 by PaulStoffregen; 09-19-2013 at 01:36 PM.

  3. #3
    Junior Member
    Join Date
    Jul 2013
    Posts
    12
    Hey, glad my patch has been helpful!

  4. #4
    Junior Member
    Join Date
    Nov 2013
    Posts
    2
    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?

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,576
    1.17-rc1 is available here.

    See the example in File > Examples > Teensy > USB_Keyboard > MediaButtons

  6. #6
    Junior Member
    Join Date
    Nov 2013
    Posts
    2
    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 by Hondo88; 11-30-2013 at 08:38 PM.

  7. #7
    Quote Originally Posted by Hondo88 View Post
    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

  8. #8
    Junior Member
    Join Date
    Aug 2014
    Posts
    1
    Quote Originally Posted by soundShinobi View Post
    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 !

  9. #9
    Administrator Paul's Avatar
    Join Date
    Oct 2012
    Posts
    338
    If anyone's still watching this old thread, new & improved media key support is available.

    https://forum.pjrc.com/threads/34074...ows-compatible

    I'm closing this old thread. Please comment on the new thread.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •