aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-11-07 23:56:24 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-11-07 23:56:24 +0100
commit02833a3bce0671a4ba3c43d81269f971bdb96145 (patch)
tree72aa73b39610aa60108117b9d19af81522e473d8
parentChanged colors a bit (diff)
downloaddmenu-02833a3bce0671a4ba3c43d81269f971bdb96145.tar.gz
dmenu-02833a3bce0671a4ba3c43d81269f971bdb96145.tar.bz2
dmenu-02833a3bce0671a4ba3c43d81269f971bdb96145.tar.xz
dmenu-02833a3bce0671a4ba3c43d81269f971bdb96145.tar.zst
dmenu-02833a3bce0671a4ba3c43d81269f971bdb96145.zip
Added support for ^j and ^k
-rw-r--r--dmenu.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/dmenu.c b/dmenu.c
index 3c96e70..ae7c292 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -507,17 +507,14 @@ keypress(XKeyEvent *ev)
case XK_g: ksym = XK_Escape; break;
case XK_h: ksym = XK_BackSpace; break;
case XK_i: ksym = XK_Tab; break;
- case XK_j: /* fallthrough */
+ case XK_j: ksym = XK_Down; break; /* fallthrough */
+ case XK_k: ksym = XK_Up; break; /* fallthrough */
case XK_J: /* fallthrough */
case XK_m: /* fallthrough */
case XK_M: ksym = XK_Return; ev->state &= ~ControlMask; break;
case XK_n: ksym = XK_Down; break;
case XK_p: ksym = XK_Up; break;
- case XK_k: /* delete right */
- text[cursor] = '\0';
- match();
- break;
case XK_u: /* delete left */
insert(NULL, 0 - cursor);
break;