summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fbcon.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fbcon.c b/fbcon.c
index 6d6bfa9..dd6a074 100644
--- a/fbcon.c
+++ b/fbcon.c
@@ -106,6 +106,7 @@ static int mapkey(unsigned *m, unsigned k, unsigned char *s)
int i = 0;
k &= 0x7f;
+ if (*m & 4) s[i++] = '\033';
if (k < sizeof(keymap)) {
c = keymap[k];
if (c-0200 < 6) {
@@ -121,9 +122,6 @@ static int mapkey(unsigned *m, unsigned k, unsigned char *s)
//if (c >= '@') c &= 0x1f;
//else if (keymap_sh[k] >= '@') c = keymap_sh[k] & 0x1f;
}
- if (*m & 4) {
- s[i++] = '\033';
- }
s[i++] = c;
return i;
}