aboutsummaryrefslogtreecommitdiff
path: root/ui/curses.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/curses.c')
-rw-r--r--ui/curses.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ui/curses.c b/ui/curses.c
index ed3165e45e..82bc614040 100644
--- a/ui/curses.c
+++ b/ui/curses.c
@@ -238,9 +238,12 @@ static void curses_refresh(DisplayState *ds)
keysym = curses2keysym[chr];
if (keysym == -1) {
- if (chr < ' ')
- keysym = (chr + '@' - 'A' + 'a') | KEYSYM_CNTRL;
- else
+ if (chr < ' ') {
+ keysym = chr + '@';
+ if (keysym >= 'A' && keysym <= 'Z')
+ keysym += 'a' - 'A';
+ keysym |= KEYSYM_CNTRL;
+ } else
keysym = chr;
}