Skip to content

input-field: add auto_submit_after option#1017

Closed
erasylurazalin wants to merge 0 commit into
hyprwm:mainfrom
erasylurazalin:main
Closed

input-field: add auto_submit_after option#1017
erasylurazalin wants to merge 0 commit into
hyprwm:mainfrom
erasylurazalin:main

Conversation

@erasylurazalin

Copy link
Copy Markdown

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

@PointerDilemma PointerDilemma left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@PointerDilemma

Copy link
Copy Markdown
Collaborator

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.

@erasylurazalin

Copy link
Copy Markdown
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PIN auto-submit after N digits typed

2 participants