From f9276e440c63f13986054ef58e72684b1815f9be Mon Sep 17 00:00:00 2001 From: Julius Michaelis Date: Thu, 24 Mar 2016 19:31:48 +0100 Subject: swaylock: Interpret XKB_KEY_BackSpace as a deletion instead of a normal key. --- main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.c b/main.c index 3f0fc86..feb6497 100644 --- a/main.c +++ b/main.c @@ -108,6 +108,14 @@ void notify_key(enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t cod password = malloc(password_size); password[0] = '\0'; break; + case XKB_KEY_BackSpace: + { + int i = strlen(password); + if (i > 0) { + password[i - 1] = '\0'; + } + break; + } default: { int i = strlen(password); -- cgit v1.2.3