From 67b4f15dbf571af8db984b9abcff1e144b2a45d9 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 5 Oct 2006 09:58:05 +0000 Subject: cheap Fn key support --- fbcon.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'fbcon.c') 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< 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; -- cgit v1.2.3