summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2015-12-25 15:44:46 +0100
committerMichael Stapelberg <michael@stapelberg.de>2015-12-25 15:44:46 +0100
commit0bdc0c644d5435115e0d659f1a8e8ec6bcf38000 (patch)
tree5db4358a8e37eeae3f92dea22b81d1bcd4744280
parentcc73d88aea94540c673c25da21954f1e37d1eb23 (diff)
Eat XKB_KEY_Delete and XKB_KEY_KP_Delete (Thanks bebehei)
fixes #50
-rw-r--r--i3lock.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/i3lock.c b/i3lock.c
index 6f63e88..3989e99 100644
--- a/i3lock.c
+++ b/i3lock.c
@@ -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 doesn’t make sense, as i3lock doesn’t allow you
+ * to move the cursor when entering a password. We need to eat this
+ * key press so that it won’t be treated as part of the password,
+ * see issue #50. */
+ return;
+
case XKB_KEY_BackSpace:
if (input_position == 0)
return;