On Sun, Apr 12, 2015 at 11:53:30AM -0700, Eric Pruitt wrote: > It appears the author wanted to make Ctrl+(Shift)+Enter print the > current selection without making dmenu exit, and this patch changes the > input handling so that actually works.
The original patch had a typo in it. The fixed version is attached. Eric
>From 295ab176ff86c79b309150d463f6510447382539 Mon Sep 17 00:00:00 2001 From: Eric Pruitt <[email protected]> Date: Sun, 12 Apr 2015 11:50:21 -0700 Subject: [PATCH] Make Ctrl+Enter print current selection - It appears the author wanted to make Ctrl+(Shift)+Enter print the current selection without making dmenu exit, and this patch changes the input handling so that actually works. --- dmenu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmenu.c b/dmenu.c index 89fd130..ef844b1 100644 --- a/dmenu.c +++ b/dmenu.c @@ -247,7 +247,7 @@ keypress(XKeyEvent *ev) { len = XmbLookupString(xic, ev, buf, sizeof buf, &ksym, &status); if(status == XBufferOverflow) return; - if(ev->state & ControlMask) + if(ev->state & ControlMask && ksym != XK_Return && ksym != XK_KP_Enter) switch(ksym) { case XK_a: ksym = XK_Home; break; case XK_b: ksym = XK_Left; break; -- 1.7.10.4
