From 8db0dbf823bccb2bc2ea3caee400916891b37948 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Sun, 31 Oct 2021 17:43:07 +0000 Subject: Also clear entry when Ctrl-C is pressed. --- src/main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 1385647..9ed471c 100644 --- a/src/main.c +++ b/src/main.c @@ -196,7 +196,15 @@ static void wl_keyboard_key( } else if (entry->password_length > 0 && sym == XKB_KEY_BackSpace) { entry->password[entry->password_length - 1] = '\0'; entry->password_length--; - } else if (sym == XKB_KEY_Escape) { + } else if (sym == XKB_KEY_Escape + || (sym == XKB_KEY_c + && xkb_state_mod_name_is_active( + client_state->xkb_state, + XKB_MOD_NAME_CTRL, + XKB_STATE_MODS_EFFECTIVE) + ) + ) + { entry->password[0] = '\0'; entry->password_length = 0; } else if (entry->password_length > 0 -- cgit v1.2.3