May 11, 2007
D-Bus Multimedia Keys Plugin for Quod Libet
Since upgrading my Ubuntu desktop to Feisty my multimedia keys stopped working when using Quod Libet, although they work fine with Rhythmbox and Totem. This is because in GNOME 2.18 that comes with Feisty, gnome-settings-daemon ‘grabs’ all multimedia keys preventing other applications to capture them. Multimedia key press events are now being broadcast via D-Bus. Therefore applications that need to listen to those events could subscribe to the proper D-Bus interface. Other GNOME apps like Rhythmbox and Totem had picked up the changes and had been adjusted accordingly. That’s why they still work in Feisty. But Quod Libet is not a GNOME application, so this new method of multimedia keys handling that is specific to GNOME should not be implemented inside the Quod Libet core. This is documented in bug #43464 in Launchpad.
Joe Wreschnig, Quod Libet’s author, suggested that this could be implemented as a plugin. After an email conversation with him, and seeing a patch posted to the bug in launchpad, I started writing the plugin last night. Now the multimedia keys work again in Quod Libet. The plugin can be downloaded from launchpad or from here (rename to dbusmmkey.py). Simply put this file in ~/.quodlibet/plugins/events/ and enable it in Quod Libet.
PS. Python is so much fun!
Follow