diff options
author | Rich Felker <dalias@aerifal.cx> | 2006-10-05 09:58:05 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2006-10-05 09:58:05 +0000 |
commit | 67b4f15dbf571af8db984b9abcff1e144b2a45d9 (patch) | |
tree | 57977156af815a34f095eafe9b6bb966c3859b94 | |
parent | 8de900bc1d0f5162a828541c45f21e6d28cdc41a (diff) |
cheap Fn key support
-rw-r--r-- | fbcon.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -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; |