]> git.sur5r.net Git - i3/i3lock/commitdiff
Eat XKB_KEY_Delete and XKB_KEY_KP_Delete (Thanks bebehei)
authorMichael Stapelberg <michael@stapelberg.de>
Fri, 25 Dec 2015 14:44:46 +0000 (15:44 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Fri, 25 Dec 2015 14:44:46 +0000 (15:44 +0100)
fixes #50

i3lock.c

index 6f63e8851a79160636e7ffe90684c10b35f0bb34..3989e993242b29e2f90ba971f57442e39ad44a72 100644 (file)
--- 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;