Multimedia Keys on Ubuntu 10.10

*nix specific usage questions
TiGRETON
New Cone
New Cone
Posts: 2
Joined: 19 Jan 2011 12:20

Multimedia Keys on Ubuntu 10.10

Postby TiGRETON » 19 Jan 2011 12:40

Hi,

I'm trying to make VLC use the multimedia keys for a Dell Inspiron 9300 in Ubuntu 10.10 Netbook Edition. Volume up, down and mute is already controlled by GNOME, but VLC does not respond to play/pause, next, prev and stop (XF86AudioPlay, XF86AudioNext, XF86AudioPrev and XF86AudioStop).

I'm reducing my tests to play/pause with a sample video. Using "--global-key-play-pause XF86AudioPlay" or "--global-key-play-pause 102" (the keycode xev returns me when I press the button) does nothing inside VLC. Using --key-play-pause instead of --global-key-play-pause has the same effect. Trying to map a new hotkey inside VLC doesn't work either (when I press the multimedia button nothing happens)

I've also tried disabling the keyboard shortcut, opening System -> Preferences -> Keyboard Shortcuts, the select the "Play (or play/pause) entry and hit backspace to disable it. Same luck :(

Keys work using another media player, such as Ubuntu's built-in one (Gstreamer, renamed to "Movie Player"), so I guess the problem is between GNOME and VLC not capturing the signals sent. I've seen some fixes, such as rebinding the multimedia keys to hidden "wget" against VLC's http interface, but would love to find a smoother solution.

Thanks!

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Multimedia Keys on Ubuntu 10.10

Postby Rémi Denis-Courmont » 19 Jan 2011 16:58

There are two common reasons why a key doesn't work:
  • Another application grabbed the key. This is usually evident - xev won't show any event when the key is pressed.
  • The key is not known to the VLC plugin that handles it.
I don't have media keys on my keyboard, so I cannot reproduce your problem.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

TiGRETON
New Cone
New Cone
Posts: 2
Joined: 19 Jan 2011 12:20

Re: Multimedia Keys on Ubuntu 10.10

Postby TiGRETON » 21 Jan 2011 18:26

Thanks for the reply Rémi. xev reports the following when pressing the Play/Pause button.

Code: Select all

KeymapNotify event, serial 34, synthetic NO, window 0x0, keys: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16 0 0 0 0 0 0 0 0 0 0
Is there a way to tell VLC to catch this key? Using the default Preferences panel from VLC doesn't work.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Multimedia Keys on Ubuntu 10.10

Postby Rémi Denis-Courmont » 22 Jan 2011 08:50

What you pasted is a not keypess events to begin with. (It's a notification that the keyboard mappings has changed.)
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

skinnerd
New Cone
New Cone
Posts: 9
Joined: 05 Feb 2007 01:57

Re: Multimedia Keys on Ubuntu 10.10

Postby skinnerd » 06 Mar 2011 09:19

i've run across the same exact problem here; can't get VLC to recognize the laptop's multimedia keys ( [fn]+F9 [fn]+F10 etc.).
ubuntu 10.10 both vlc versions 1.1.4 & 1.1.7 were tested. same results all around.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Multimedia Keys on Ubuntu 10.10

Postby Rémi Denis-Courmont » 06 Mar 2011 09:35

You need to stop the application that grabbed the multimedia keys.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

skinnerd
New Cone
New Cone
Posts: 9
Joined: 05 Feb 2007 01:57

Re: Multimedia Keys on Ubuntu 10.10

Postby skinnerd » 06 Mar 2011 12:49

this is happening on a vanilla install. there is to the best of my knowledge, no other applications (multimedia or otherwise) running.

rykel98
New Cone
New Cone
Posts: 2
Joined: 08 Mar 2011 03:25

Re: Multimedia Keys on Ubuntu 10.10

Postby rykel98 » 08 Mar 2011 05:30

Hi, I am using a Prolink Wireless keyboard with multimedia keys too. Like the above post says, I can control Ubuntu Volume Control and Rhythmbox but NOT VLC Player. Any help would be much appreciated. Thanks, Rykel

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Multimedia Keys on Ubuntu 10.10

Postby Rémi Denis-Courmont » 08 Mar 2011 16:58

Kill the Ubuntu Volume Control and Rythmbox then.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

rykel98
New Cone
New Cone
Posts: 2
Joined: 08 Mar 2011 03:25

Re: Multimedia Keys on Ubuntu 10.10

Postby rykel98 » 09 Mar 2011 03:47

Kill the Ubuntu Volume Control and Rythmbox then.
Hi Remi, only problem is... How?

Also, Rhythmbox should not be running as I never start it... but since Rhythmbox does appear as a link when I click on the Volume Control, I am not sure if it is auto-loaded by the OS at startup.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Multimedia Keys on Ubuntu 10.10

Postby Rémi Denis-Courmont » 09 Mar 2011 16:47

This is not a Ubuntu support forum.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

akog82
New Cone
New Cone
Posts: 1
Joined: 24 May 2012 08:32

Re: Multimedia Keys on Ubuntu 10.10

Postby akog82 » 24 May 2012 08:39

Sorry to necro-post, but I have been having a similar issue, and found very little in the way of help, despite a very thorough "Google-ing".

Will this issue remain unattended due to the original posters use of a GNU/Linux distribution? :?

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Multimedia Keys on Ubuntu 10.10

Postby Rémi Denis-Courmont » 24 May 2012 09:05

There is no solution. GNOME thinks it's right for them to grab the multimedia keys (arguably correct for volume keys), and VLC is thus unable to receive them, even when it has the focus.

It's not a technical problem, it's a design decision from GNOME. The VLC forum cannot fix that.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

dowcet
New Cone
New Cone
Posts: 2
Joined: 19 Jun 2014 16:06

Re: Multimedia Keys on Ubuntu 10.10

Postby dowcet » 19 Jun 2014 16:09

Over on a thread at the Ubuntu forum, it suggests deactivating the global shortcut keys, which is easy enough:
System>>Preferences>>Keyboard Shortcuts
Under Sound, clear the keys for "Play (or Play/Pause)", "Previous track", "Next track", and for that matter anything else that uses a key that you want to have in VLC.

These keys will now work when setting hotkeys in VLC. Problem solved.


But it still didn't work for me at first, because I didn't realize VLC sets *Global* hotkeys separately, in a column next to the regular ones. Once I defined the hotkeys there and restarted VLC, it worked fine.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 14 guests