diff options
-rw-r--r-- | slock.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -16,6 +16,7 @@ #include <sys/types.h> #include <X11/extensions/Xrandr.h> #include <X11/keysym.h> +#include <X11/XF86keysym.h> #include <X11/Xlib.h> #include <X11/Xutil.h> @@ -157,6 +158,17 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens, IsPrivateKeypadKey(ksym)) continue; switch (ksym) { + case XF86XK_MonBrightnessUp: + case XF86XK_MonBrightnessDown: + XSendEvent(dpy, DefaultRootWindow(dpy), True, KeyPressMask, &ev); + break; + case XF86XK_AudioStop: + case XF86XK_AudioPlay: + case XF86XK_AudioPrev: + case XF86XK_AudioNext: + XSendEvent(dpy, locks[0]->root, True, KeyPressMask, &ev); + XSendEvent(dpy, DefaultRootWindow(dpy), True, KeyPressMask, &ev); + break; case XK_Return: passwd[len] = '\0'; errno = 0; |