slock-terminalkeys-20160618-65b8d52.diff (572B)
1 diff --git a/slock.c b/slock.c 2 index c9cdee2..03e191d 100644 3 --- a/slock.c 4 +++ b/slock.c 5 @@ -149,6 +149,22 @@ readpw(Display *dpy, const char *pws) 6 IsPFKey(ksym) || 7 IsPrivateKeypadKey(ksym)) 8 continue; 9 + if (ev.xkey.state & ControlMask) { 10 + switch (ksym) { 11 + case XK_u: 12 + ksym = XK_Escape; 13 + break; 14 + case XK_m: 15 + ksym = XK_Return; 16 + break; 17 + case XK_j: 18 + ksym = XK_Return; 19 + break; 20 + case XK_h: 21 + ksym = XK_BackSpace; 22 + break; 23 + } 24 + } 25 switch (ksym) { 26 case XK_Return: 27 passwd[len] = 0;