Problem
hyprlock requires a physical Return keypress to submit the password. There is no pointer or touch path to submit.
Submission goes through g_pAuth->submitInput(passBuffer), currently only reached from the XKB_KEY_Return / XKB_KEY_KP_Enter branch in src/core/hyprlock.cpp.
Current workaround is synthesising Return via ydotool, which needs uinput and ydotoold.
Proposed shape
A boolean submit_on_click on the clickable widgets (label, image, shape) that already carry onclick from #736. When the widget is clicked and the option is set, hyprlock calls submitInput on the current buffer.
shape {
size = 200, 60
position = 0, -100
halign = center
valign = center
submit_on_click = true
}
Parallels fade_on_empty, ignore_empty_input etc. for naming.
Semantics
- Honours
general:ignore_empty_input identically to the Return branch.
- Must gate on
g_pAuth->checkWaiting() to match the existing guard at src/core/hyprlock.cpp:617, which short-circuits the Return path while PAM is mid-check. The widget click path has no such guard today, so rapid clicking would otherwise queue concurrent submitInput calls.
- If both
onclick and submit_on_click are set on the same widget, the shell command is spawned asynchronously and submitInput is called in the same handler; order between the async spawn and the PAM call is not observable.
Notes
Problem
hyprlock requires a physical Return keypress to submit the password. There is no pointer or touch path to submit.
Submission goes through
g_pAuth->submitInput(passBuffer), currently only reached from theXKB_KEY_Return/XKB_KEY_KP_Enterbranch insrc/core/hyprlock.cpp.Current workaround is synthesising Return via
ydotool, which needs uinput andydotoold.Proposed shape
A boolean
submit_on_clickon the clickable widgets (label,image,shape) that already carryonclickfrom #736. When the widget is clicked and the option is set, hyprlock callssubmitInputon the current buffer.Parallels
fade_on_empty,ignore_empty_inputetc. for naming.Semantics
general:ignore_empty_inputidentically to the Return branch.g_pAuth->checkWaiting()to match the existing guard atsrc/core/hyprlock.cpp:617, which short-circuits the Return path while PAM is mid-check. The widget click path has no such guard today, so rapid clicking would otherwise queue concurrentsubmitInputcalls.onclickandsubmit_on_clickare set on the same widget, the shell command is spawned asynchronously andsubmitInputis called in the same handler; order between the async spawn and the PAM call is not observable.Notes
hide_cursor).