I am running Linux Mint.

I am an Apple Music subscriber, so I had to find a way to install iTunes. I opted to install Windows 7 in a VM. (Windows 10 had issues with VirtualBox's seamless mode).

The one issue I have is that my media keys don't have any effect on the program running in VirtualBox. In order to pause the music, I need to focus the window and press the space bar or the on screen pause button, which is rather inconvenient.

How can I automatically forward my media keys to VirtualBox?

My keyboard is an Alienware TactX.


Mint's XFCE has application shortcuts that you can assign to apparently any key (or combination) in the Keyboard settings.

If you can assign a shortcut to your media keys, then you could run a command or script that would switch to VirtualBox & send the desired keys. Maybe a macro program?

I tried it with my keyboard, it's got 3 "user" keys, an internet key, and volume keys. The "user" keys give an "Unknown key released" error to dmesg / /var/log/syslog that says setkeycodes should get it working. The internet & volume keys are set ok. But, the audio controls in XFCE intercept the volume keys before passing them to the keyboard shortcut, more config changes would probably fix that.

And tried these ideas?

  • From https://www.virtualbox.org/ticket/4263 : "Disabling [or enabling] automatic keyboard capture in the global machine settings"
  • Use "Seamless Mode" and move the media player window around like a "regular" linux window? (Needs VirtualBox’s Guest Additions package inside the virtual machine)

Seamless mode

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.