28

My keyboard has media keys and they work globally on Unity with Banshee but don't with VLC when another app is focused.

How would I fix that?

1
  • 1
    Simply you need to restart VLC to make the settings take effect!
    – Sadegh
    Jul 8, 2016 at 9:11

7 Answers 7

25

I had a similar problem and the issue was that Gnome would capture the media keys before they reached VLC, to fix this you can go to "System->Preferences->Keyboard Shortcuts"

There you will see a header called sound (Expand it if needed), and remove the key combinations you want in VLC from there (You can disable them by clicking on the item and then pressing backspace).

Only problem with this is that any other applications that do use Gnome's built-in handling won't work anymore with the media keys, unless you add them again (Which in turn breaks VLC again)

3
  • I don't know why, but I had also to restart the computer to make it recognize global keys,
    – Jader Dias
    Jun 12, 2011 at 18:29
  • 2
    For me it was enough to restart VLC.
    – Bombe
    Apr 21, 2013 at 20:28
  • Just re-emphasizing, you have to REMOVE the bindings. And this is NOT the VLC preferences, it's the operating system keyboard settings. More verbose info here: major.io/2015/02/20/… Dec 23, 2018 at 14:25
13

VLC comes with configurable hotkey definitions. To access the hotkey menu open Tools -> Preferences -> Hotkeys:

enter image description here

The key for a given action can be determined by clicking on the line in between Clear and Apply. Then a window pops up to ask you for the new key combination. Press Apply to save these.

This procedure works fine with standard keyboard keys. However depending on keyboard hardware layout multimedia keys may not be recognized correctly (bug #419795, Videolan Support, Videolan on Ubuntu 10.10)

3
  • 3
    Unfortunately that won’t be enough while GNOME still intercepts those keys. You need to disable them in the system settings.
    – Bombe
    Apr 21, 2013 at 20:29
  • I would set it to "global" instead of "hotkeys", so I can still play/pause with a spacebar inside VLC. Then as @Bombe said also disable the keys in system settings. Nov 16, 2015 at 8:35
  • 1
    And restart VLC May 26, 2017 at 13:30
10

I use Ubuntu 14.04(64-bit) and VLC 2.1.5

In VLC, go to Tools > Preferences > Hotkeys. You will find three columns Action, HotKey, Global.

See the image uploaded by the user Takkat.

Click on the Global column[Next to the HotKey column] corresponding to the Action you seek, enter the media key combination and click Save.

Restart VLC.

2
  • this is the correct answer to the question as it does not affect other apps - the upvoted answer are systemwide settings.
    – user115639
    Apr 6, 2016 at 23:16
  • one quirk, I had to unset the action in ubuntu system shortcut, then set vlc shurtcut global as Fazil said, and then set ubuntu system shortcut back. Sep 27, 2016 at 15:20
7

The only workaround I could think of is to add a key modifier, e.g. press an Alt while pressing the multimedia key. That way the key combination is different from what's captured by GNOME thus it simulates the effect of using multimedia key to control VLC.

I used this only for play/pause (So the key is Alt+XF86AudioPlay, something like this; in VLC it shows as Alt+"Media Play Pause").

1

Here is an updated answer for Ubuntu 13.10 using VLC media player 2.0.8:

In Ubuntu, go to System Settings > Keyboard > Shortcuts > Sound and Media

Disable the key combinations you want in VLC (by clicking on the item and pressing backspace).

In VLC, go to Tools > Preferences > Hotkeys

Set the key combinations you previously disabled to a VLC action in a Global.

You can then set back the keyboard shortcut for the Ubuntu System in order for the other applications that do use Gnome's built-in handling to work. However, when VLC is running, VLC will take precedence over other applications.

EDIT: you may also need to relaunch VLC for the new hotkeys to be updated.

0

I got it working by downloading hotkeys in the software centre. I search hotkeys in the software centre and it shows up. It says is A hotkeys daemon for your Internet/multimedia keyboard in X.

First I download it, and than I had to disable the system hotkeys, than set the hotkeys in VLC, finally I enable the system's hotkeys. I can pause, play, and skip with the keyboard even with VLC minimize.

1
  • 1
    @salip, Can you please add the steps or a screenshot and help us understand better.
    – devav2
    Nov 9, 2012 at 18:58
0

If you have the Google Music extension installed in Google Chrome, that will also intercept the media keys. I had to disable the Google Music extension, and then VLC noticed my media keys.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .