1
1
mirror of https://github.com/swaywm/sway synced 2024-11-18 00:24:17 +01:00

swaylock: Interpret XKB_KEY_BackSpace as a deletion instead of a normal key.

This commit is contained in:
Julius Michaelis 2016-03-24 19:31:48 +01:00
parent fb4fdf5336
commit 956ca66d2c

@ -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);