Re: [hackers] [slock][patch] Prevent shift key from toggling to failed state

From: Michael Buch <michaelbuch12_AT_gmail.com>
Date: Mon, 27 Aug 2018 22:37:07 +0200

Hey,

Wouldn't follwing patch solve your problem?:
https://tools.suckless.org/slock/patches/control-clear

Regards,

Michael

Am Mo., 27. Aug. 2018 um 20:18 Uhr schrieb Michael Spradling
<mike_AT_mspradling.com>:
>
> Currently if the first character pressed is the shift key, slock moves
> to the failed state. The failed state can modify the display and
> provide incorrect feedback to the user and also gives away that your
> first character required the shift key.
> ---
> slock.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/slock.c b/slock.c
> index 5ae738c..e9dd1ad 100644
> --- a/slock.c
> +++ b/slock.c
> _AT_@ -154,7 +154,9 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
> IsKeypadKey(ksym) ||
> IsMiscFunctionKey(ksym) ||
> IsPFKey(ksym) ||
> - IsPrivateKeypadKey(ksym))
> + IsPrivateKeypadKey(ksym) ||
> + ksym == XK_Shift_L ||
> + ksym == XK_Shift_R)
> continue;
> switch (ksym) {
> case XK_Return:
> --
> 2.18.0
>
>
Received on Mon Aug 27 2018 - 22:37:07 CEST

This archive was generated by hypermail 2.3.0 : Mon Aug 27 2018 - 22:48:21 CEST