diff -up a/slock.c b/slock.c --- a/slock.c +++ b/slock.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -180,6 +181,21 @@ readpw(Display *dpy, struct xrandr *rr, explicit_bzero(&passwd, sizeof(passwd)); len = 0; break; + case XF86XK_AudioRaiseVolume: + XSendEvent(dpy, DefaultRootWindow(dpy), True, KeyPressMask, &ev); + break; + case XF86XK_AudioLowerVolume: + XSendEvent(dpy, DefaultRootWindow(dpy), True, KeyPressMask, &ev); + break; + case XF86XK_AudioMute: + XSendEvent(dpy, DefaultRootWindow(dpy), True, KeyPressMask, &ev); + break; + case XF86XK_MonBrightnessUp: + XSendEvent(dpy, DefaultRootWindow(dpy), True, KeyPressMask, &ev); + break; + case XF86XK_MonBrightnessDown: + XSendEvent(dpy, DefaultRootWindow(dpy), True, KeyPressMask, &ev); + break; case XK_BackSpace: if (len) passwd[len--] = '\0';