GNOME Bugzilla – Bug 104537
Rhythmbox needs to work with ACME
Last modified: 2004-12-22 21:47:04 UTC
ACME is a great multimedia key mapping program, but right now the only program that works with it is totem. I think Rhythmbox support will make both programs much more useful.
ACME has the following functions that are applicable ... - Volume keys (Mute, Volume Down, Volume Up) These change the global settings, but could be changed to do so in rb if it is present (will need to be changed in ACME I think). rb should probably allow these functions anyway. - Play, Pause, Stop, Previous and Next, and Refresh (see News below) See also .. http://bugzilla.gnome.org/show_bug.cgi?id=99376
There's nothing to change in ACME to support these keys with Rhythmbox. ACME is application agnostic on purpose. All it does is associate the keys with the keysym. Rhythmbox just needs to catch keycodes like totem does. For example: static gboolean totem_action_handle_key (Totem *totem, guint keyval) { gboolean retval = TRUE; switch (keyval) { case XF86XK_AudioPlay: case XF86XK_AudioPause: case GDK_p: case GDK_P: totem_action_play_pause (totem); break; etc.
Cool, in which case, I'll have look at what totem does.
Cheers for the gentle nudge. ACME is really cool, and I should've read the README! Only problem is that when I try to trap the key presses for 'XF86XK_AudioLowerVolume', 'XF86XK_AudioRaiseVolume' and 'XF86XK_AudioMute', these are intercepted by ESD (or something). Are these keys preset, or is it a 'first-come', 'first-served' basis?
I'm not sure, you may want to contact the ACME maintainer: hadess@hadess.net
They work just the same way normal keys would. 'XF86XK_AudioLowerVolume', 'XF86XK_AudioRaiseVolume' and 'XF86XK_AudioMute' aren't bound by ACME. All the other ones should work properly.
Created attachment 14009 [details] [review] The attached patch adds basic ACME functionality, with the Pause / Play / Prev / Next functions added to the rb-player code.
Mark: use diff -u, don't use C++ style comments, check for modifiers and don't forget to add checks for the keysyms header in configure.in (see acme CVS' configure.in).
I've worked on a patch for the 0.4.4.99.4 branch of the code, which fixes most of the above.
Created attachment 14216 [details] [review] Patch for the 0.4.4.99.4 branch
Created attachment 14247 [details] [review] Patch for CVS HEAD.
The patch to the HEAD (above) probably needs some work to detect whether the NEXT and PREV functionality should be called, to avoiding going beyond the bounds of the current 'selection'.
Created attachment 16388 [details] [review] Patch against net-rb head (09/05/03)
Created attachment 16423 [details] [review] Patch against the latest rhythmbox HEAD
Created attachment 16424 [details] [review] Slightly fixed version of previous patch
Assigning to me. -harshy
Created attachment 19264 [details] [review] This patch grabs the keys so that the rhythmbox window doesn't need to have the focus.
Patch in cvs, Thanks!