input-field: add auto_submit_after option#1017
Conversation
PointerDilemma
left a comment
There was a problem hiding this comment.
No, this is the wrong way to implement it.
Since input handling is not tied to input-field in hyprlock (input-field is just a visualization of it), this feature should be in the general config section and should be triggered directly where chars are added to the password buffer. that way it's also a lot easier to implement.
|
Also check my comment in #1012. I really don't want people to enable if they have a normal pam configuration tied to their user password. Any mechanism to make sure users are aware of the implications of this setting is good. |
|
Moved the logic to handleKeySym in the core as suggested. PasswordInputField is now untouched. Also added the warning comment next to the config registration about the password length leak. thanks for the feedback |
Adds a new optional config key auto_submit_after to input-field. When set to N > 0, the input field automatically submits after N characters are typed without requiring Enter, similar to a phone PIN screen.
Submission is deferred by one frame so the final dot animates before PAM begins checking. A pending timer is cancelled if the buffer changes before it fires.
Fixes: #1012