Arduino Leonardo Multimedia keys problem

Hello, World!

This is my first message in the community)

I've got an Arduino Leonardo a couple of weeks ago and I'd like to make it work as a multimedia keyboard (one that selects tracks and changes volume). I'd like to make it as a HID device, so I can control my Android tablet and PC :-) (if it is not possible, at least the tablet pc)

I tried to search in many places, but I don't know how to attach for example LUFA library...

Could you please provide a step by step tutorial, how to send commands from Arduino to tablet which will select next track and shift the volume?

Currently I'm using Keyboard.press(...); But I cannot find a scan code for Next Track.

Regards, Alexander

Welcome!

The Leonardo is fun, I use it to stuff "boilerplate" into forum messages. I haven't had to do it to you. ;)

Could you please provide a step by step tutorial, how to send commands from Arduino to tablet which will select next track and shift the volume?

What tablet?

Good day, Nick!

The tablet is Hyundai T7. It has Android 4.2 on board. Connection via OTG cable.

I recently picked up a Leonardo, and I found your post while looking for a way to do something similar with multimedia keys.

It took a while, but I updated a couple of Arduino source files that provide access to Volume, Track, and Playback controls on pretty much every device I've tried, including a Nexus 7 with OTG.

With this, you'd be able to do a Remote.next() to switch tracks, and Remote.increase() or Remote.decrease() to change the volume. :)

In case you're still interested, the source is available, along with a description of what had to be changed to make it work.

http://stefanjones.ca/blog/arduino-leonardo-remote-multimedia-keys/

Sorry to bring this thread back from the dead...

I was struggling with this as well with Android for a carputer. I wanted the pushbutton on a rotary encoder to go to the next track:

What I did to get it to work was take a lesser used key (in my case F23, Usage ID 114), and then edit /system/usr/keylayout/qwerty.kl and Generic.kl so that MEDIA_NEXT was changed from 163 to 193.

To determine the proper scancodes I used KeyEvent Display from the Play Store.

I know, it's pretty barbaric, but it works, and hopefully it will help someone else. I posted my sketch on the mp3car forum: http://www.mp3car.com/worklogs/156771-2004-ford-focus-zts-and-odroid-u3.html#post1503206