diff options
-rw-r--r-- | dmenu.c | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -354,45 +354,36 @@ kpress(XKeyEvent * e) { | |||
354 | return; | 354 | return; |
355 | /* first check if a control mask is omitted */ | 355 | /* first check if a control mask is omitted */ |
356 | if(e->state & ControlMask) { | 356 | if(e->state & ControlMask) { |
357 | switch (ksym) { | 357 | switch(tolower(ksym)) { |
358 | default: /* ignore other control sequences */ | 358 | default: /* ignore other control sequences */ |
359 | return; | 359 | return; |
360 | case XK_a: | 360 | case XK_a: |
361 | case XK_A: | ||
362 | ksym = XK_Home; | 361 | ksym = XK_Home; |
363 | break; | 362 | break; |
364 | case XK_c: | 363 | case XK_c: |
365 | case XK_C: | ||
366 | ksym = XK_Escape; | 364 | ksym = XK_Escape; |
367 | break; | 365 | break; |
368 | case XK_e: | 366 | case XK_e: |
369 | case XK_E: | ||
370 | ksym = XK_End; | 367 | ksym = XK_End; |
371 | break; | 368 | break; |
372 | case XK_h: | 369 | case XK_h: |
373 | case XK_H: | ||
374 | ksym = XK_BackSpace; | 370 | ksym = XK_BackSpace; |
375 | break; | 371 | break; |
376 | case XK_i: | 372 | case XK_i: |
377 | case XK_I: | ||
378 | ksym = XK_Tab; | 373 | ksym = XK_Tab; |
379 | break; | 374 | break; |
380 | case XK_j: | 375 | case XK_j: |
381 | case XK_J: | ||
382 | ksym = XK_Return; | 376 | ksym = XK_Return; |
383 | break; | 377 | break; |
384 | case XK_k: | 378 | case XK_k: |
385 | case XK_K: | ||
386 | text[cursor] = '\0'; | 379 | text[cursor] = '\0'; |
387 | break; | 380 | break; |
388 | case XK_u: | 381 | case XK_u: |
389 | case XK_U: | ||
390 | memmove(text, text + cursor, sizeof text - cursor + 1); | 382 | memmove(text, text + cursor, sizeof text - cursor + 1); |
391 | cursor = 0; | 383 | cursor = 0; |
392 | match(text); | 384 | match(text); |
393 | break; | 385 | break; |
394 | case XK_w: | 386 | case XK_w: |
395 | case XK_W: | ||
396 | if(cursor > 0) { | 387 | if(cursor > 0) { |
397 | i = cursor; | 388 | i = cursor; |
398 | while(i-- > 0 && text[i] == ' '); | 389 | while(i-- > 0 && text[i] == ' '); |