aboutsummaryrefslogtreecommitdiff
path: root/swaylock/password.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-06-08 16:03:50 +0100
committerGitHub <noreply@github.com>2018-06-08 16:03:50 +0100
commitc65c84444e58404f951c628221b7485da0684f19 (patch)
tree578c0249b9ecf8eb8579b828862db3107d1a22bd /swaylock/password.c
parentacf71fe8053efadbfb81d2ea010ac6facf41cd81 (diff)
parentc78ce0770a8c75d63853c6c85f789b68f56ee3ed (diff)
Merge pull request #2121 from martinetd/swaylock-ctrl-u
swaylock: implement ^U to clear buffer
Diffstat (limited to 'swaylock/password.c')
-rw-r--r--swaylock/password.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/swaylock/password.c b/swaylock/password.c
index 6d493309..bb32286e 100644
--- a/swaylock/password.c
+++ b/swaylock/password.c
@@ -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);