[PATCH] Make Ctrl+Enter print current selection

From: Eric Pruitt <eric.pruitt_AT_gmail.com>
Date: Sun, 12 Apr 2015 11:50:21 -0700

- 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
_AT_@ -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 && ksym != XK_KP_Enter)
 		switch(ksym) {
 		case XK_a: ksym = XK_Home;      break;
 		case XK_b: ksym = XK_Left;      break;
-- 
1.7.10.4
--wRRV7LY7NUeQGEoC--
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Sun Apr 12 2015 - 21:00:09 CEST