Eat XKB_KEY_Delete and XKB_KEY_KP_Delete (Thanks bebehei)

fixes #50
pull/54/head
Michael Stapelberg 2015-12-25 15:44:46 +01:00
parent cc73d88aea
commit 0bdc0c644d
1 changed files with 8 additions and 0 deletions

View File

@ -409,6 +409,14 @@ static void handle_key_press(xcb_key_press_event_t *event) {
clear_input();
return;
case XKB_KEY_Delete:
case XKB_KEY_KP_Delete:
/* Deleting forward doesnt make sense, as i3lock doesnt allow you
* to move the cursor when entering a password. We need to eat this
* key press so that it wont be treated as part of the password,
* see issue #50. */
return;
case XKB_KEY_BackSpace:
if (input_position == 0)
return;