Media key binding without gnome-settings-daemon

Bug #614850 reported by EvilGnome
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pithos
Fix Released
Medium
Kevin Mehall

Bug Description

I don't know how Pithos tries to bind keys, but it doesn't work on my system (Arch 64). xev reports my keys as XF86AudioPlay, etc.

I know that python-keybinder (http://kaizer.se/wiki/keybinder/) does work for me.

Please let me know if there's more helpful information I can provide.

Revision history for this message
Kevin Mehall (kevin-mehall) wrote :

Are you using GNOME? It uses the Gnome Settings Daemon DBUS interface to bind media keys, so it probably won't work if you're not running GNOME. Or maybe Arch has something configured differently?

One advantage of using DBUS is it responds to the user's selection of keys for media events in the Keyboard Shortcuts panel instead of hard-coding key names. I'm not sure what other differences there are. Maybe it should fall back on something less desktop-specific if it doesn't see that DBUS name...

Changed in pithos:
status: New → Confirmed
importance: Undecided → Medium
summary: - ERROR:root:Could not bind media keys
+ Media key binding without gnome-settings-daemon
Revision history for this message
EvilGnome (evilgnome) wrote :

My DE is compiz and gtk stuff, but not exactly gnome, and I don't have gnome-settings-daemon installed. I for one would appreciate a fallback DE-agnostic system. python-keybinder is easy to use. Something like:

import keybinder
keybinder.bind('XF86AudioPlay', play_method, None)
keybinder.bind('XF86AudioStop', stop_method, None)
keybinder.bind('XF86AudioNext', skip_method, None)

Changed in pithos:
status: Confirmed → Fix Committed
Changed in pithos:
status: Fix Committed → Fix Released
assignee: nobody → Kevin Mehall (kevin-mehall)
Revision history for this message
Kevin Mehall (kevin-mehall) wrote :

Can you test this and make sure it works? When I forced it to use keybinder, it gave an error, but I think it was because gnome-settings-daemon already has those keys bound.

Revision history for this message
EvilGnome (evilgnome) wrote :

I just tested it out -- thanks for the fix!

It works, but...

The play/pause media key ('XF86AudioPlay') displays and resumes the track, but does not pause it. I believe it should pause the track if it is already playing. When it resumes, there is a short skip, as if it really resume-pause-resumes it.

The stop button ('XF86AudioStop') pauses the track, but does not resume it. That's ok, as long as the play button will be changed to act as a play/pause button.

The previous button, while it doesn't cause any trouble and has no practical use here, results in this output "TypeError: present() takes no arguments (1 given)"

Thanks again!

Revision history for this message
Kevin Mehall (kevin-mehall) wrote :

That should be fixed now in bzr trunk.

The previous button raises the Pithos window.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.