GNOME Bugzilla – Bug 422390
Allow bypassing multimedia keys
Last modified: 2014-08-19 21:00:55 UTC
It should be possible for user to change audio volume when the screensaver is active.
And stop music.
programs that are interested in receiving these keypresses should just listen on the system dbus for the key-press events that hal generates: signal sender=:1.0 -> dest=(null destination) path=/org/freedesktop/Hal/devices/usb_device_5ac_20b_noserial_if1_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition string "ButtonPressed" string "volume-down" these keypresses are captured directly from the event device from hal itself and are completely independent of X. problem of course is how to deal with multiple active sessions -- i guess you could ask consolekit :)
Created attachment 95767 [details] [review] multimedia-bypass.patch I have been experimenting a bit with this feature, but ran into one problem: * How could I emit the key so gnome-settings-daemon would pick it up? :) Patch also requires eggaccelerators.[ch] from gnome-control-center/capplets/keybindings/
(In reply to comment #2) > programs that are interested in receiving these keypresses should just listen > on the system dbus for the key-press events that hal generates: > > signal sender=:1.0 -> dest=(null destination) > path=/org/freedesktop/Hal/devices/usb_device_5ac_20b_noserial_if1_logicaldev_input; > interface=org.freedesktop.Hal.Device; member=Condition > string "ButtonPressed" > string "volume-down" > > > these keypresses are captured directly from the event device from hal itself > and are completely independent of X. This doesn't work if I change the keybindings in the GNOME capplet, I guess.
vincent: you're right. it doesn't. i think we should probably decide on the one way that we want to handle this. it seems excessively silly to have both ways setup. i personally view the multimedia keys as sort of "out of band" with respect to the rest of the keyboard, so for me, it makes sense to have them delivered separately. in any case, i prefer to have one channel for the delivery of this information that is always active (rather than multiple channels that are active depending on who has X keyboard grab). consider the case of gksudo or ssh-askpass grabbing keyboard input. the user would probably find it a little bit counter-intuitive that their multimedia keys don't work while these apps are running.
*** Bug 333505 has been marked as a duplicate of this bug. ***
*** Bug 484601 has been marked as a duplicate of this bug. ***
Confirming because of the duplicates.
Some laptops have special keys for volume up, volume down and mute but lack special multi media play, pause, next, previous keys. E.g. with Amarok, which I use, I have configured combinations of SHIFT, ALT and CTRL with F11 or F12 to do just that. Ans also would like to be able to do so when the screensaver has locked my keyboard. What I would like to suggest is to (also) provide a way that users can specify a list of keys or key combinations that can be 'whitelisted' from the screensaver keyboard lock. Implementing this feature will allow users with what kind of special or non special keys on their keyboard or laptop to configure it just they way they would like to.
It should just read the keybindings from gconf. No need to add some configuration in the screensaver for this.
*** Bug 538066 has been marked as a duplicate of this bug. ***
*** Bug 562354 has been marked as a duplicate of this bug. ***
*** Bug 562875 has been marked as a duplicate of this bug. ***
I suggested in a duplicate that additional information be passed to applications so that pressing "Play/Pause" would only ever pause, never start playing from a locked session.
This is also needed to make buttons on Bluetooth headsets work when the screensaver is on.
Despite this request being a bit old, I think it's still valid, and would be a welcome feature. I think a nice solution to partially deal with security concerns would be to have an additional "Enable Media-keys Passthrough" button on the normal locked-screen 'enter-password' dialog. This would require that the user type their password, and click this button instead of the 'unlock' button. Then the machine would remain locked, but the passthrough would be enabled (by default it is disabled). Furthermore, there could be some kind of optional 'passthrough timeout' that the user can select in the gnome-screensaver-settings, which would disable the passthrough after x minutes / hours of enabling it.
Mark, good ideas! What would be the media keys? I would like to propose: - volume up - volume down - volume mute toggle - play/pause song - stop song - next song - previous song - brightness up - brightness down
For me don't make sense type the password to "enable media-keys passthrough", since I don't want to type my password anyway only to change the volume level. I think that media keys are the ones that you have in your keyboard.
+1 to carlos. No password typing please. If someone has physical access to your computer then can do worse things (like turning it off).
See also http://issues.workrave.org/show_bug.cgi?id=1028 perhaps implementation can be re-used.
*** Bug 658356 has been marked as a duplicate of this bug. ***
There's a patch to pass through the video mode switch key to g-s-d in bug 590188 . We should see if the same approach would be applicable for volume keys.
*** Bug 665729 has been marked as a duplicate of this bug. ***
*** Bug 688608 has been marked as a duplicate of this bug. ***
gnome-screensaver is obsolete, and this particular bug has been fixed in gnome-shell itself, and in gnome-settings-daemon (which handles the multimedia keys).
*** Bug 590188 has been marked as a duplicate of this bug. ***