mediakeys patch

- Apply mediakeys patch
- Update README with link to mediakeys patch
- Add diff to patches folder
This commit is contained in:
Sravan Balaji
2020-12-11 10:52:54 -05:00
parent b8e289d20a
commit 430c9be6c2
3 changed files with 45 additions and 0 deletions

13
slock.c
View File

@@ -19,6 +19,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/XKBlib.h>
#include <X11/XF86keysym.h>
#include "arg.h"
#include "util.h"
@@ -163,6 +164,18 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
IsPrivateKeypadKey(ksym))
continue;
switch (ksym) {
case XF86XK_AudioPlay:
case XF86XK_AudioStop:
case XF86XK_AudioPrev:
case XF86XK_AudioNext:
case XF86XK_AudioRaiseVolume:
case XF86XK_AudioLowerVolume:
case XF86XK_AudioMute:
case XF86XK_AudioMicMute:
case XF86XK_MonBrightnessDown:
case XF86XK_MonBrightnessUp:
XSendEvent(dpy, DefaultRootWindow(dpy), True, KeyPressMask, &ev);
break;
case XK_Return:
passwd[len] = '\0';
errno = 0;