Commit Diff


commit - 36319ab7f50197afbece516698181da3a4cfbc26
commit + bee0837c8d793e3c1065ee45e732c9112c1f3782
blob - 8abc957166eab82c7d2d1f8afc5f6f7d470131a2
blob + d7cad52e802c9dd9ebf3fed9e93282d494824adf
--- mymenu.1
+++ mymenu.1
@@ -78,9 +78,14 @@ The foreground of the selected completion.
 .El
 
 .Sh KEYS
+This is the list of keybinding recognized by
+.Li Nm Ns .
+In the following examples, C-c means Control-c.
 .Bl -tag -width indent-two
 .It Esc
 Close the menu without selecting any entry
+.It C-c
+The same as Esc
 .It Enter
 Close the menu and print to stdout what the user typed
 .It C-m
blob - 2d8cb82b48d3038774ee704ce75f00d27ac3c858
blob + ec8cbcd78fe11cd012e496736f70d2ad9d221e36
--- mymenu.1.md
+++ mymenu.1.md
@@ -112,10 +112,18 @@ MyMenu.completion\_highlighted.foreground
 
 # KEYS
 
+This is the list of keybinding recognized by
+**mymenu**.
+In the following examples, C-c means Control-c.
+
 Esc
 
 > Close the menu without selecting any entry
 
+C-c
+
+> The same as Esc
+
 Enter
 
 > Close the menu and print to stdout what the user typed
@@ -181,4 +189,4 @@ sysexits(3)
 
 Omar Polo <omar.polo@europecom.net>
 
-OpenBSD 6.3 - June 14, 2018
+OpenBSD 6.3 - July 1, 2018
blob - 5f023ff07aec16c946854bc27843f0945016b18a
blob + 28365607b0d283fc703da2a287dedeab4845386e
--- mymenu.c
+++ mymenu.c
@@ -783,6 +783,8 @@ enum action parse_event(Display *d, XKeyPressedEvent *
       return PREV_COMPL;
     if (!strcmp(str, "")) // C-n
       return NEXT_COMPL;
+    if (!strcmp(str, "")) // C-c
+      return EXIT;
   }
 
   *input = strdup((char*)&symbol);