How to make the keyboard media keys to work with VLC globally?

46,901

Solution 1

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)

Solution 2

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.

Solution 3

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").

Solution 4

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.

Share:
46,901

Related videos on Youtube

David Morales
Author by

David Morales

Perl, Javascript, C#, Go, Matlab and Python Developer

Updated on September 18, 2022

Comments

  • David Morales
    David Morales almost 2 years

    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?

    • Admin
      Admin almost 8 years
      Simply you need to restart VLC to make the settings take effect!
  • Admin
    Admin about 13 years
    I don't know why, but I had also to restart the computer to make it recognize global keys,
  • Bombe
    Bombe about 11 years
    Unfortunately that won’t be enough while GNOME still intercepts those keys. You need to disable them in the system settings.
  • Václav Pavlík
    Václav Pavlík over 8 years
    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.
  • Danilo Lucic
    Danilo Lucic about 8 years
    this is the correct answer to the question as it does not affect other apps - the upvoted answer are systemwide settings.
  • Bernardo Kyotoku
    Bernardo Kyotoku almost 8 years
    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.
  • Michal Kováč
    Michal Kováč about 7 years
    And restart VLC
  • Admin
    Admin over 5 years
    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/…