games/c64: make keyboard table more readable

front
aiju 2018-11-17 09:48:46 +00:00
parent 744867de34
commit fbfa249c63
1 changed files with 64 additions and 8 deletions

View File

@ -133,14 +133,70 @@ keyproc(void *)
u16int j;
u64int k;
static Rune keymap[64] = {
Kbs, '\n', Kleft, KF|7, KF|1, KF|3, KF|5, Kup,
'3', 'w', 'a', '4', 'z', 's', 'e', Kshift,
'5', 'r', 'd', '6', 'c', 'f', 't', 'x',
'7', 'y', 'g', '8', 'b', 'h', 'u', 'v',
'9', 'i', 'j', '0', 'm', 'k', 'o', 'n',
'\'', 'p', 'l', '-', '.', '\\', '@', ',',
'[', '*', ';', Khome, Kalt, '=', ']', '/',
'1', Kins, '\t', '2', ' ', Kctl, 'q', Kdel
[0] Kbs, /* Inst/Del */
[1] '\n', /* Return */
[2] Kleft, /* ←→ */
[3] KF|7, /* F7/F8 */
[4] KF|1, /* F1/F2 */
[5] KF|3, /* F3/F4 */
[6] KF|5, /* F5/F6 */
[7] Kup, /* ↑↓ */
[8] '3', /* 3 */
[9] 'w', /* W */
[10] 'a', /* A */
[11] '4', /* 4 */
[12] 'z', /* Z */
[13] 's', /* S */
[14] 'e', /* E */
[15] Kshift, /* LeftShift */
[16] '5', /* 5 */
[17] 'r', /* R */
[18] 'd', /* D */
[19] '6', /* 6 */
[20] 'c', /* C */
[21] 'f', /* F */
[22] 't', /* T */
[23] 'x', /* X */
[24] '7', /* 7 */
[25] 'y', /* Y */
[26] 'g', /* G */
[27] '8', /* 8 */
[28] 'b', /* B */
[29] 'h', /* H */
[30] 'u', /* U */
[31] 'v', /* V */
[32] '9', /* 9 */
[33] 'i', /* I */
[34] 'j', /* J */
[35] '0', /* 0 */
[36] 'm', /* M */
[37] 'k', /* K */
[38] 'o', /* O */
[39] 'n', /* N */
[40] '\'', /* + */
[41] 'p', /* P */
[42] 'l', /* L */
[43] '-', /* */
[44] '.', /* > */
[45] '\\', /* [ */
[46] '@', /* @ */
[47] ',', /* < */
[48] '[', /* £ */
[49] '*', /* * */
[50] ';', /* ] */
[51] Khome, /* Clr/Home */
[52] Kalt, /* RightShift */
[53] '=', /* = */
[54] ']', /* ↑ */
[55] '/', /* ? */
[56] '1', /* 1 */
[57] Kins, /* ← */
[58] '\t', /* Ctrl */
[59] '2', /* 2 */
[60] ' ', /* Space */
[61] Kctl, /* Commodore */
[62] 'q', /* Q */
[63] Kdel, /* Run/Stop */
};
static char buf[256];
char *s;