You are not logged in.
Hello! Does anyone know how to get Multimedia keys to work in dwm?
I tried something like this in my config.h, after defining the voldowncmd of course:
#include <X11/XF86keysym.h>
...
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldowncmd } }
But that didn't work.
I googled, and it seems like it was possible to do something like this in the past, but I guess the config.h changed...
I would prefer not to use xbindkeys if possible.
Thanks for your help!
Last edited by Odd-rationale (2008-11-04 06:51:44)
Offline
That looks about right--actually someone just posted within the past couple of days asking nearly the same thing and it worked for them. Are you sure the key is properly identified by X as XF86AudioLowerVolume?
thayer williams ~ cinderwick.ca
Offline
Actually, I solved it. It turned out to be a problem with how I defined the voldowncmd.
Here is how it looks now:
/* commands */
static const char *volupcmd[] = { "mpc", "volume", "+1", NULL };
static const char *voldowncmd[] = { "mpc", "volume", "-1", NULL };
static Key keys[] = {
/* modifier key function argument */
{ 0, 0x1008ff13, spawn, {.v = volupcmd } },
{ 0, 0x1008ff11, spawn, {.v = voldowncmd } },
};
I also decided to use the keycodes instead of XF86*. That way, "#include <X11/XF86keysym.h>" is unnecessary.
Anyways, glad I got this solved!
Offline