diff options
author | emersion <contact@emersion.fr> | 2018-06-08 16:03:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-08 16:03:50 +0100 |
commit | c65c84444e58404f951c628221b7485da0684f19 (patch) | |
tree | 578c0249b9ecf8eb8579b828862db3107d1a22bd /swaylock/password.c | |
parent | Merge pull request #2119 from martinetd/gcc-strtruncation (diff) | |
parent | swaylock: implement ^U to clear buffer (diff) | |
download | sway-c65c84444e58404f951c628221b7485da0684f19.tar.gz sway-c65c84444e58404f951c628221b7485da0684f19.tar.zst sway-c65c84444e58404f951c628221b7485da0684f19.zip |
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.c | 8 |
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, | |||
139 | state->auth_state = AUTH_STATE_INPUT_NOP; | 139 | state->auth_state = AUTH_STATE_INPUT_NOP; |
140 | damage_state(state); | 140 | damage_state(state); |
141 | break; | 141 | break; |
142 | case XKB_KEY_u: | ||
143 | if (state->xkb.control) { | ||
144 | clear_password_buffer(&state->password); | ||
145 | state->auth_state = AUTH_STATE_CLEAR; | ||
146 | damage_state(state); | ||
147 | break; | ||
148 | } | ||
149 | // fallthrough | ||
142 | default: | 150 | default: |
143 | if (codepoint) { | 151 | if (codepoint) { |
144 | append_ch(&state->password, codepoint); | 152 | append_ch(&state->password, codepoint); |