mirror of
https://github.com/swaywm/sway.git
synced 2026-04-02 07:15:50 -04:00
swaylock: implement ^U to clear buffer
The whole state->xcb.modifiers thing didn't work at all (always 0) The xkb doc says "[xkb_state_serialize_mods] should not be used in regular clients; please use the xkb_state_mod_*_is_active API instead" so here it is
This commit is contained in:
parent
acf71fe805
commit
c78ce0770a
3 changed files with 16 additions and 57 deletions
|
|
@ -139,6 +139,14 @@ void swaylock_handle_key(struct swaylock_state *state,
|
|||
state->auth_state = AUTH_STATE_INPUT_NOP;
|
||||
damage_state(state);
|
||||
break;
|
||||
case XKB_KEY_u:
|
||||
if (state->xkb.control) {
|
||||
clear_password_buffer(&state->password);
|
||||
state->auth_state = AUTH_STATE_CLEAR;
|
||||
damage_state(state);
|
||||
break;
|
||||
}
|
||||
// fallthrough
|
||||
default:
|
||||
if (codepoint) {
|
||||
append_ch(&state->password, codepoint);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue