i3lock-color

The world's most popular non-default computer lockscreen.
Index Commits Files Refs README LICENSE
commit 63a4c23ec6f0b3f62144122a4277d51caf023e4f
parent c27e4c092c34414a11eb570bbf78a4021a6b67dc
Author: Chris Guillott <chris@techfo.xyz>
Date:   Tue, 10 May 2016 10:36:30 -0400

Merge pull request #3 from i3/master

Allow CTRL+J as enter and CTRL+H as backspace (#72)
Diffstat:
Mi3lock.c | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/i3lock.c b/i3lock.c
@@ -397,9 +397,13 @@ static void handle_key_press(xcb_key_press_event_t *event) {
 #endif
 
     switch (ksym) {
+        case XKB_KEY_j:
         case XKB_KEY_Return:
         case XKB_KEY_KP_Enter:
         case XKB_KEY_XF86ScreenSaver:
+            if (ksym == XKB_KEY_j && !ctrl)
+                break;
+
             if (pam_state == STATE_PAM_WRONG)
                 return;
 
@@ -444,7 +448,11 @@ static void handle_key_press(xcb_key_press_event_t *event) {
              * see issue #50. */
             return;
 
+        case XKB_KEY_h:
         case XKB_KEY_BackSpace:
+            if (ksym == XKB_KEY_h && !ctrl)
+                break;
+
             if (input_position == 0)
                 return;
 
@@ -453,7 +461,7 @@ static void handle_key_press(xcb_key_press_event_t *event) {
             password[input_position] = '\0';
 
             /* Hide the unlock indicator after a bit if the password buffer is
-         * empty. */
+             * empty. */
             START_TIMER(clear_indicator_timeout, 1.0, clear_indicator_cb);
             unlock_state = STATE_BACKSPACE_ACTIVE;
             redraw_screen();