summaryrefslogtreecommitdiff
path: root/fbcon.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2006-10-05 09:58:05 +0000
committerRich Felker <dalias@aerifal.cx>2006-10-05 09:58:05 +0000
commit67b4f15dbf571af8db984b9abcff1e144b2a45d9 (patch)
tree57977156af815a34f095eafe9b6bb966c3859b94 /fbcon.c
parent8de900bc1d0f5162a828541c45f21e6d28cdc41a (diff)
cheap Fn key support
Diffstat (limited to 'fbcon.c')
-rw-r--r--fbcon.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/fbcon.c b/fbcon.c
index 99c4c20..e92b063 100644
--- a/fbcon.c
+++ b/fbcon.c
@@ -115,7 +115,19 @@ static int mapkey(unsigned *m, unsigned k, unsigned char *s)
else *m |= 1<<c;
return 0;
}
- if (rel || c > 0x80) return 0;
+ if (rel) return 0;
+ if (c > 0300) {
+ c -= 0300;
+ s[i++] = '\033';
+ s[i++] = '[';
+ if (c < 6) s[i++] = '[';
+ else if (c < 9) s[i++] = '1';
+ else s[i++] = '2';
+ s[i++] = "ABCDE7890134"[c-1];
+ if (c >= 6) s[i++] = '~';
+ return i;
+ }
+ if (c > 0x80) return 0;
if (*m & 9) c = keymap_sh[k];
if (*m & 18) {
if (keymap_sh[k] >= '@') c = keymap_sh[k] & 0x1f;