aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Lane Smith <cls@lubutu.com>2010-06-20 01:19:17 +0100
committerConnor Lane Smith <cls@lubutu.com>2010-06-20 01:19:17 +0100
commit97797d90a6396c2fc0109a7bd47bb260d1143c8a (patch)
treeef1202a48a91d3cd212de3c778ae6e769796e256
parent4983707c706d399e8af8d40c60c1b8b25e4c590a (diff)
downloaddmenu-97797d90a6396c2fc0109a7bd47bb260d1143c8a.tar.gz
dmenu-97797d90a6396c2fc0109a7bd47bb260d1143c8a.tar.bz2
dmenu-97797d90a6396c2fc0109a7bd47bb260d1143c8a.zip
cleaned up
-rw-r--r--dmenu.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/dmenu.c b/dmenu.c
index 1d239c2..ec62602 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -354,45 +354,36 @@ kpress(XKeyEvent * e) {
return;
/* first check if a control mask is omitted */
if(e->state & ControlMask) {
- switch (ksym) {
+ switch(tolower(ksym)) {
default: /* ignore other control sequences */
return;
case XK_a:
- case XK_A:
ksym = XK_Home;
break;
case XK_c:
- case XK_C:
ksym = XK_Escape;
break;
case XK_e:
- case XK_E:
ksym = XK_End;
break;
case XK_h:
- case XK_H:
ksym = XK_BackSpace;
break;
case XK_i:
- case XK_I:
ksym = XK_Tab;
break;
case XK_j:
- case XK_J:
ksym = XK_Return;
break;
case XK_k:
- case XK_K:
text[cursor] = '\0';
break;
case XK_u:
- case XK_U:
memmove(text, text + cursor, sizeof text - cursor + 1);
cursor = 0;
match(text);
break;
case XK_w:
- case XK_W:
if(cursor > 0) {
i = cursor;
while(i-- > 0 && text[i] == ' ');