summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Luedecke <ritze@skweez.net>2017-09-05 23:57:46 +0200
committerMoritz Luedecke <ritze@skweez.net>2017-09-05 23:57:46 +0200
commit6fc1c94d12bef7826a91b0b7e7b676a2b49f8891 (patch)
tree08b431b129a6e21eb24062ed23e881f034918bb4
parent68a35247008c8f5ebf8e23cbdb86cd2c0f3025a1 (diff)
You can abort the dialog and password prompt with CTRL+C
-rw-r--r--pinentry-dmenu.c11
1 files changed, 11 insertions, 0 deletions
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;