From 6fc1c94d12bef7826a91b0b7e7b676a2b49f8891 Mon Sep 17 00:00:00 2001 From: Moritz Luedecke Date: Tue, 5 Sep 2017 23:57:46 +0200 Subject: You can abort the dialog and password prompt with CTRL+C --- pinentry-dmenu.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pinentry-dmenu.c b/pinentry-dmenu.c index a2ff9ae..1f05b1c 100644 --- a/pinentry-dmenu.c +++ b/pinentry-dmenu.c @@ -385,6 +385,12 @@ keypress(XKeyEvent *ev) { case XK_N: sel = No; return 1; + case XK_c: + if (ev->state == ControlMask) { + pinentry->canceled = 1; + sel = No; + return 1; + } case XK_Escape: pinentry->canceled = 1; sel = No; @@ -410,6 +416,11 @@ keypress(XKeyEvent *ev) { } insert(NULL, nextrune(cursor, -1) - cursor); break; + case XK_c: + if (ev->state == ControlMask) { + pinentry->canceled = 1; + return 1; + } case XK_Escape: pinentry->canceled = 1; return 1; -- cgit v1.2.3