From 5fa767f5f20a025793d4968f9421e946c1612c4b Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Thu, 28 Sep 2023 02:15:31 +0200 Subject: Ignore initial control modifier keypresse --- slock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'slock.c') diff --git a/slock.c b/slock.c index 962bf7d..8974197 100644 --- a/slock.c +++ b/slock.c @@ -184,8 +184,9 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens, passwd[--len] = '\0'; break; default: - if (num && !iscntrl((int)buf[0]) && - (len + num < sizeof(passwd))) { + if (controlkeyclear && iscntrl((int)buf[0])) + continue; + if (num && (len + num < sizeof(passwd))) { memcpy(passwd + len, buf, num); len += num; } -- cgit v1.2.3-71-gd317