12 static Rune vnckeys[] =
14 [0x00] 0, 0, 0, 0, 0, 0, 0, 0,
15 [0x08] '\b', '\t', '\r', 0, 0, '\n', 0, 0,
16 [0x10] 0, 0, 0, 0, Kscroll,0, 0, 0,
17 [0x18] 0, 0, 0, Kesc, 0, 0, 0, 0,
18 [0x20] 0, 0, 0, 0, 0, 0, 0, 0,
19 [0x28] 0, 0, 0, 0, 0, 0, 0, 0,
20 [0x30] 0, 0, 0, 0, 0, 0, 0, 0,
21 [0x38] 0, 0, 0, 0, 0, 0, 0, 0,
22 [0x40] 0, 0, 0, 0, 0, 0, 0, 0,
23 [0x48] 0, 0, 0, 0, 0, 0, 0, 0,
24 [0x50] Khome, Kleft, Kup, Kright, Kdown, Kpgup, Kpgdown,Kend,
25 [0x58] 0, 0, 0, 0, 0, 0, 0, 0,
26 [0x60] 0, Kprint, 0, Kins, 0, 0, 0, 0,
27 [0x68] 0, 0, 0, Kbreak, 0, 0, 0, 0,
28 [0x70] 0, 0, 0, 0, 0, 0, 0, 0,
29 [0x78] 0, 0, 0, 0, 0, 0, 0, Knum,
30 [0x80] 0, 0, 0, 0, 0, 0, 0, 0,
31 [0x88] 0, 0, 0, 0, 0, 0, 0, 0,
32 [0x90] 0, 0, 0, 0, 0, 0, 0, 0,
33 [0x98] 0, 0, 0, 0, 0, 0, 0, 0,
34 [0xa0] 0, 0, 0, 0, 0, 0, 0, 0,
35 [0xa8] 0, 0, '*', '+', 0, '-', '.', '/',
36 [0xb0] '0', '1', '2', '3', '4', '5', '6', '7',
37 [0xb8] '8', '9', 0, 0, 0, '=', 0, 0,
38 [0xc0] 0, 0, 0, 0, 0, 0, 0, 0,
39 [0xc8] 0, 0, 0, 0, 0, 0, 0, 0,
40 [0xd0] 0, 0, 0, 0, 0, 0, 0, 0,
41 [0xd8] 0, 0, 0, 0, 0, 0, 0, 0,
42 [0xe0] 0, Kshift, Kshift, Kctl, Kctl, Kcaps, Kcaps, 0,
43 [0xe8] 0, Kalt, Kalt, 0, 0, 0, 0, 0,
44 [0xf0] 0, 0, 0, 0, 0, 0, 0, 0,
45 [0xf8] 0, 0, 0, 0, 0, 0, 0, Kdel,
52 vncputc(int keyup, int c)
59 if((c & VKSpecial) == VKSpecial){
60 c = vnckeys[c & 0xff];
65 * map an xkeysym onto a utf-8 char
67 if((c & 0xff00) && c < nelem(ksym2utf) && ksym2utf[c] != 0)
69 snprint(buf, sizeof(buf), "r%C", c);
73 write(kbdin, buf, strlen(buf)+1);