hello, I've recently started using indimpc[1]. It's just a tiny program that grabs your multimedia keys and lets you use them to control mpd. There's a glitch here, which I'd like some help on: If indimpc is running, and I run totem, the multimedia keys start to affect them both. So, if I want to pause totem, the pause multimedia key will have two results: - pause totem - play mpd This is the code snippet from indimpc:
def grab_mmkeys(self):
try:
keysbus = self.bus.get_object("org.gnome.SettingsDaemon",
"/org/gnome/SettingsDaemon/MediaKeys")
keysbus.GrabMediaPlayerKeys("indimpc", 0,
dbus_interface="org.gnome.SettingsDaemon.MediaKeys")
keysbus.connect_to_signal("MediaPlayerKeyPressed", self.delegate_mediakeys)
except:
sys.stderr.write("[WARNING] indimpc: can't grab multimedia keys using
gnome-settings-daemon.\n")
try:
import keybinder
keybinder.bind("XF86AudioPlay", self.toggle_playback)
keybinder.bind("XF86AudioStop", self.stop)
keybinder.bind("XF86AudioPrev", self.play_previous)
keybinder.bind("Xf86AudioNext", self.play_next)
except:
sys.stderr.write("[WARNING] indimpc: can't grab multimedia keys using
keybinder either.")
I was wondering if there's a way to ensure that indimpc only has the multimedia key when no other program is holding them. Is there a way to do this? Maybe give it least priority? Any suggestions would be appreciated :) [1] https://github.com/fmoralesc/indimpc -- Thanks, Regards, Ankur: "FranciscoD" http://fedoraproject.org/wiki/User:Ankursinha http://dodoincfedora.wordpress.com/
Attachment:
signature.asc
Description: This is a digitally signed message part