-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Ctrl-J to validate the password #71
Comments
I think this captures the problem perfectly: everybody would want something else. However, we don't want a generic binding configurability in i3lock because it would make it a whole lot more complex and therefore potentially unsafe. IMHO you'd be best served by implementing this as a local patch. |
I don't use i3lock, but I could see why the user base would consider this feature valuable by giving i3lock a "terminal" feel. Ctrl-j will enter a password that you enter from a terminal, for instance. As for this being a gateway to bindings in i3lock, I don't think that would be the case. However, it would be a gateway to supporting any of the emacs-based terminal commands (such as ctrl-h for backspace, ctrl-u for kill line) which might be complicated and is definitely would be an increase of scope for i3lock. I'm not sure if there is a library that already handles that kind of user input but there might be. I don't feel strongly either way about this, however. i3lock would be very easy to fork and make your own project out of with more scope. |
As we don't need readline abilities (like moving the cursor, etc) but only key inputs then Enter, I don't think that multiple ways to type "Enter" is too much. I'm I clear enough? |
Now that I think about it, I can't imagine this exploding into either bindings or readline. If you make ctrl-j work however, people will expect ctrl-h for backspace as well. Maybe @Airblader is not aware that this is a widely used standard in interactive unix programs and text editors (maybe from before there was an enter key or something? I don't know.). |
Chiming in here. I think that, ctrl-u would also be expected to work, if crtl-j is supported. ctrl-u deletes the whole line before the cursor. Thus I think it should delete the whole passphrase that was entered until that point, because the cursor is always at the end. |
So Ctrl+J now already went to Ctrl+J, Ctrl+U, Ctrl+H in less than 24 hours. See my point? |
Ctrl+U is already in the code. I know that every feature adds unwanted complexity to i3lock. But I think in this case a few lines to add support for the Ctrl+J and Ctrl+H are not that complex. To me adding them now seems like a "bug" fix, because the three keys form a whole, and Ctrl+U is alone at the moment. One option would be to remove Ctrl+U, however that would break someones workflow. So I propose that these minor features should be added. |
Given that we already support the keypad return key as an alternative to return, I think adding ctrl+j would be okay — it should be just another case statement. |
You did it, thanks all! |
Hello guys,
First of all, thanks for this simple but perfect locker !
As a vim user, I like not to move my hands, for exemple to access the Enter key.. I usually use Ctrl-J to validate something, and would like to have that feature in i3lock also.
So for exemple, I type my password as usual, then I type Ctrl-J to validate the password
I went through the code, and think that there is something to change arround thoses lines :
https://github.com/i3/i3lock/blob/master/i3lock.c#L369
What do you think about this ?
The text was updated successfully, but these errors were encountered: