# HG changeset patch # User Michal Janeczek # Date 1190474490 -7200 # Node ID c4b6b3824c0000e68629453d5b602cd3ec3a476c # Parent cf675ec8058cfa43abe5c01c556302a04a0fe550 Added common key aliases (C-m for accept, C-c for abort) diff -r cf675ec8058c -r c4b6b3824c00 dmenu.1 --- a/dmenu.1 Sat Sep 22 17:18:11 2007 +0200 +++ b/dmenu.1 Sat Sep 22 17:21:30 2007 +0200 @@ -69,18 +69,18 @@ Select the first/last item. .B Tab (Control\-i) Copy the selected item to the input field. .TP -.B Return (Control\-j) +.B Return (Control\-j, Control\-m) Confirm selection and quit (print the selected item to standard output). Returns .B 0 on termination. .TP -.B Shift\-Return (Control\-Shift\-j) +.B Shift\-Return (Control\-Shift\-j, Control\-Shift\-m) Confirm selection and quit (print the text in the input field to standard output). Returns .B 0 on termination. .TP -.B Escape (Control\-bracketleft) +.B Escape (Control\-bracketleft, Control\-c) Quit without selecting an item. Returns .B 1 on termination. diff -r cf675ec8058c -r c4b6b3824c00 dmenu.c --- a/dmenu.c Sat Sep 22 17:18:11 2007 +0200 +++ b/dmenu.c Sat Sep 22 17:21:30 2007 +0200 @@ -334,6 +334,8 @@ kpress(XKeyEvent * e) { switch (ksym) { default: /* ignore other control sequences */ return; + case XK_c: + case XK_C: case XK_bracketleft: ksym = XK_Escape; break; @@ -347,6 +349,8 @@ kpress(XKeyEvent * e) { break; case XK_j: case XK_J: + case XK_m: + case XK_M: ksym = XK_Return; break; case XK_u: