changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: games/c64: make keyboard table more readable

changeset 6889: f8944a8c8647
parent 6888: 4136602b93e9
child 6890: f47a9f61f3ed
author: aiju
date: Sat, 17 Nov 2018 09:48:46 +0000
files: sys/src/games/c64/c64.c
description: games/c64: make keyboard table more readable
     1.1--- a/sys/src/games/c64/c64.c
     1.2+++ b/sys/src/games/c64/c64.c
     1.3@@ -133,14 +133,70 @@ keyproc(void *)
     1.4 	u16int j;
     1.5 	u64int k;
     1.6 	static Rune keymap[64] = {
     1.7-		Kbs, '\n', Kleft, KF|7, KF|1, KF|3, KF|5, Kup,
     1.8-		'3', 'w', 'a', '4', 'z', 's', 'e', Kshift,
     1.9-		'5', 'r', 'd', '6', 'c', 'f', 't', 'x',
    1.10-		'7', 'y', 'g', '8', 'b', 'h', 'u', 'v',
    1.11-		'9', 'i', 'j', '0', 'm', 'k', 'o', 'n',
    1.12-		'\'', 'p', 'l', '-', '.', '\\', '@', ',',
    1.13-		'[', '*', ';', Khome, Kalt, '=', ']', '/',
    1.14-		'1', Kins, '\t', '2', ' ', Kctl, 'q', Kdel
    1.15+		[0] Kbs, /* Inst/Del */
    1.16+		[1] '\n', /* Return */
    1.17+		[2] Kleft, /* ←→ */
    1.18+		[3] KF|7, /* F7/F8 */
    1.19+		[4] KF|1, /* F1/F2 */
    1.20+		[5] KF|3, /* F3/F4 */
    1.21+		[6] KF|5, /* F5/F6 */
    1.22+		[7] Kup, /* ↑↓ */
    1.23+		[8] '3', /* 3 */
    1.24+		[9] 'w', /* W */
    1.25+		[10] 'a', /* A */
    1.26+		[11] '4', /* 4 */
    1.27+		[12] 'z', /* Z */
    1.28+		[13] 's', /* S */
    1.29+		[14] 'e', /* E */
    1.30+		[15] Kshift, /* LeftShift */
    1.31+		[16] '5', /* 5 */
    1.32+		[17] 'r', /* R */
    1.33+		[18] 'd', /* D */
    1.34+		[19] '6', /* 6 */
    1.35+		[20] 'c', /* C */
    1.36+		[21] 'f', /* F */
    1.37+		[22] 't', /* T */
    1.38+		[23] 'x', /* X */
    1.39+		[24] '7', /* 7 */
    1.40+		[25] 'y', /* Y */
    1.41+		[26] 'g', /* G */
    1.42+		[27] '8', /* 8 */
    1.43+		[28] 'b', /* B */
    1.44+		[29] 'h', /* H */
    1.45+		[30] 'u', /* U */
    1.46+		[31] 'v', /* V */
    1.47+		[32] '9', /* 9 */
    1.48+		[33] 'i', /* I */
    1.49+		[34] 'j', /* J */
    1.50+		[35] '0', /* 0 */
    1.51+		[36] 'm', /* M */
    1.52+		[37] 'k', /* K */
    1.53+		[38] 'o', /* O */
    1.54+		[39] 'n', /* N */
    1.55+		[40] '\'', /* + */
    1.56+		[41] 'p', /* P */
    1.57+		[42] 'l', /* L */
    1.58+		[43] '-', /* − */
    1.59+		[44] '.', /* > */
    1.60+		[45] '\\', /* [ */
    1.61+		[46] '@', /* @ */
    1.62+		[47] ',', /* < */
    1.63+		[48] '[', /* £ */
    1.64+		[49] '*', /* * */
    1.65+		[50] ';', /* ] */
    1.66+		[51] Khome, /* Clr/Home */
    1.67+		[52] Kalt, /* RightShift */
    1.68+		[53] '=', /* = */
    1.69+		[54] ']', /* ↑ */
    1.70+		[55] '/', /* ? */
    1.71+		[56] '1', /* 1 */
    1.72+		[57] Kins, /* ← */
    1.73+		[58] '\t', /* Ctrl */
    1.74+		[59] '2', /* 2 */
    1.75+		[60] ' ', /* Space */
    1.76+		[61] Kctl, /* Commodore */
    1.77+		[62] 'q', /* Q */
    1.78+		[63] Kdel, /* Run/Stop */
    1.79 	};
    1.80 	static char buf[256];
    1.81 	char *s;