diff options
| author | Julius Michaelis <gitter@liftm.de> | 2016-03-24 19:31:48 +0100 |
|---|---|---|
| committer | Julius Michaelis <gitter@liftm.de> | 2016-03-24 19:41:33 +0100 |
| commit | f9276e440c63f13986054ef58e72684b1815f9be (patch) | |
| tree | 3aeafd22013620ed6cbc7b5b1f9116456b3030b7 /main.c | |
| parent | 12c8d40d8996dd420eb723d0b35ff5034a15a9b1 (diff) | |
swaylock: Interpret XKB_KEY_BackSpace as a deletion instead of a normal key.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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); |
