[hackers] [dmenu] applied Hiltjo's patch as suggested on the ml to fix ControlMask for C-j and C-m || Anselm R Garbe

From: <git_AT_suckless.org>
Date: Wed, 17 Sep 2014 13:40:47 +0200

commit 13a529ce63364544bdc851dfd5d3aa2ef8740914
Author: Anselm R Garbe <garbeam_AT_gmail.com>
Date: Wed Sep 17 13:40:11 2014 +0200

    applied Hiltjo's patch as suggested on the ml to fix ControlMask for C-j and C-m

diff --git a/dmenu.1 b/dmenu.1
index bbee17d..2897ab1 100644
--- a/dmenu.1
+++ b/dmenu.1
_AT_@ -136,6 +136,9 @@ Delete line right
 C\-m
 Return
 .TP
+C\-M
+Shift-Return
+.TP
 C\-n
 Down
 .TP
diff --git a/dmenu.c b/dmenu.c
index b56f3a8..94c70de 100644
--- a/dmenu.c
+++ b/dmenu.c
_AT_@ -256,9 +256,9 @@ keypress(XKeyEvent *ev) {
                 case XK_h: ksym = XK_BackSpace; break;
                 case XK_i: ksym = XK_Tab; break;
                 case XK_j: /* fallthrough */
- case XK_J: ksym = XK_Return; break;
+ case XK_J: /* fallthrough */
                 case XK_m: /* fallthrough */
- case XK_M: ksym = XK_Return; break;
+ case XK_M: ksym = XK_Return; ev->state &= ~ControlMask; break;
                 case XK_n: ksym = XK_Down; break;
                 case XK_p: ksym = XK_Up; break;
 
Received on Wed Sep 17 2014 - 13:40:47 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 17 2014 - 13:48:08 CEST