9front - general discussion about 9front
 help / color / mirror / Atom feed
* /sys/src/cmd/nusb/kb/kb.c
@ 2017-02-07  2:20 kokamoto
  0 siblings, 0 replies; only message in thread
From: kokamoto @ 2017-02-07  2:20 UTC (permalink / raw)
  To: 9front

I looked this file more deeply, and found it works for
usb japanese keyboard, too, if a minor adding of
sctab[] for Japanese usb keyboard.   It means to replace
the original (for European lang?) sctab[] by new one.

---from here----
/* for Japanese keyboard K.Okamoto */
static char sctab[256] = 
{
[0x00]	0x0,	0xff,	0xfc,	0x0,	0x1e,	0x30,	0x2e,	0x20,
[0x08]	0x12,	0x21,	0x22,	0x23,	0x17,	0x24,	0x25,	0x26,
[0x10]	0x32,	0x31,	0x18,	0x19,	0x10,	0x13,	0x1f,	0x14,
[0x18]	0x16,	0x2f,	0x11,	0x2d,	0x15,	0x2c,	0x2,	0x3,
[0x20]	0x4,	0x5,	0x6,	0x7,	0x8,	0x9,	0xa,	0xb,
[0x28]	0x1c,	0x1,	0xe,	0xf,	0x39,	0xc,	0xd,	0x1a,
[0x30]	0x1b,	0x2b,	0x2b,	0x27,	0x28,	0x29,	0x33,	0x34,
[0x38]	0x35,	0x3a,	0x3b,	0x3c,	0x3d,	0x3e,	0x3f,	0x40,
[0x40]	0x41,	0x42,	0x43,	0x44,	0x57,	0x58,	0x37,	0x46,
[0x48]	0xc6,	0x52,	0x47,	0x49,	0x53,	0x4f,	0x51,	0x4d,
[0x50]	0x4b,	0x50,	0x48,	0x45,	0x35,	0x37,	0x4a,	0x4e,
[0x58]	0x1c,	0x4f,	0x50,	0x51,	0x4b,	0x4c,	0x4d,	0x47,
[0x60]	0x48,	0x49,	0x52,	0x53,	0x56,	0x0,	0x5e,	0x59,
[0x68]	0x64,	0x65,	0x66,	0x67,	0x68,	0x69,	0x6a,	0x6b,
[0x70]	0x6c,	0x6d,	0x6e,	0x76,	0x0,	0x0,	0x0,	0x0,
[0x78]	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,
[0x80]	0x0,	0x0,	0x0,	0x0,	0x0,	0x7e,	0x0,	0x73,
[0x88]	0x70,	0x7d,	0x79,	0x7b,	0x5c,	0x0,	0x0,	0x0,
[0x90]	0xf2,	0xf1,	0x78,	0x77,	0x76,	0x0,	0x0,	0x0,
[0x98]	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,
[0xa0]	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,
[0xa8]	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,
[0xb0]	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,
[0xb8]	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,
[0xc0]	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,
[0xc8]	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,
[0xd0]	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,
[0xd8]	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,
[0xe0]	0x1d,	0x2a,	0x38,	0x5b,	0x1d,	0x36,	0x38,	0x5c,
[0xe8]	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,
[0xf0]	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,
[0xf8]	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,
};
--- to here----


A question:
In rerpeatproc() function
		t = Kbdelay;   <====
		if(alt(a) == 1){
			t = Kbrepeat;
			while(alt(a) == 1)
				putscan(kbdinfd, sc, 0);
		}
, why the arrowed line neccessary?
What is the difference between 500 ms or 100 ms wait?

Kenji

PS. please change a line of /sys/lib/kbmap/jp:
1	0xc	'=
1	0xd	0   <====
1	0x1a	'`
to
1	0xd	'~



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-02-07  2:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-07  2:20 /sys/src/cmd/nusb/kb/kb.c kokamoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).