2 Commits
1.6 ... master

Author SHA1 Message Date
Hiltjo Posthuma
3791a996e2 add a comment for the ctrl-u clear field combo 2025-08-16 11:11:27 +02:00
Drew Marino
bf0a5577ac Support ^U for clearing password
^U is a fairly common key combo for clearing fields, this patch adds
support for it.
2025-08-16 11:05:32 +02:00

View File

@@ -185,6 +185,9 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
(len + num < sizeof(passwd))) {
memcpy(passwd + len, buf, num);
len += num;
} else if (buf[0] == '\025') { /* ctrl-u clears input */
explicit_bzero(&passwd, sizeof(passwd));
len = 0;
}
break;
}