changeset: 311:daefdd7ce876
tag: tip
user: Connor Lane Smith <cls_AT_lubutu.com>
date: Sun Jun 20 01:19:17 2010 +0100
files: dmenu.c
description:
cleaned up
diff -r f9ec28c3da4c -r daefdd7ce876 dmenu.c
--- a/dmenu.c Sun Jun 20 00:44:26 2010 +0100
+++ b/dmenu.c Sun Jun 20 01:19:17 2010 +0100
@@ -354,45 +354,36 @@
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] == ' ');
Received on Sun Jun 20 2010 - 00:19:22 UTC
This archive was generated by hypermail 2.2.0 : Sun Jun 20 2010 - 00:24:04 UTC