From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 References: In-Reply-To: From: "Jens K. Loewe" Date: Sat, 27 Jul 2019 21:18:38 +0200 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset="UTF-8" Subject: Re: [9fans] Trying to make 9front work on QWERTZ Topicbox-Message-UUID: 0343aa86-eada-11e9-9d60-3106f5b1d025 > maybe your keyboard produces a different scancode? The internal T60 keyboard, a native USB keyboard and a DIN-to-USB converted keyboard all produce the wrong scancodes on different hardware? That sounds unreasonable. But I'll try to test that next week ... thank you. Am Sa., 27. Juli 2019 um 11:22 Uhr schrieb : > > on my t23, which has physical german keyboard layout, the scancode > for the [<>|] key left to the [Y] key is 0x56 (86 decimal), which > is not mapped with us layout. > > tho this is mapped in german keyboard layout: > > term% grep ' 86' /sys/lib/kbmap/de > 0 86 '< > 1 86 '> > 2 86 0 > 3 86 '| > 4 86 0 > > running the following on my t23 maps it. > > term% echo '0 0x56 ''<' > /dev/kbmap > term% echo '1 0x56 ''>' > /dev/kbmap > term% echo '3 0x56 ''|' > /dev/kbmap > > maybe your keyboard produces a different scancode? > > you can attach ratrace to kbdfs [scanproc] pid and look what > it reads back from /dev/scancode for a ps2 keyboard. > usb keyboards work differently. > > you can bring back that scancode debug thing with F11/F12 > with the following patch which should work for both ps2 and usb > keyboards. > > --- a/sys/src/cmd/aux/kbdfs/kbdfs.c Thu Jul 25 17:44:47 2019 +0200 > +++ b/sys/src/cmd/aux/kbdfs/kbdfs.c Sat Jul 27 11:12:20 2019 +0200 > @@ -43,6 +43,7 @@ > int alt; > int altgr; > int leds; > + int debug; > }; > > struct Qtab { > @@ -337,6 +338,9 @@ > { > Key key; > > + if(scan->debug) > + fprint(2, "kbdputsc %#p sc %x esc1 %d esc2 %d\n", scan, c, scan->esc1, scan->esc2); > + > /* > * e0's is the first of a 2 character sequence, e1 and e2 the first > * of a 3 character sequence (on the safari) > @@ -390,6 +394,13 @@ > if(scan->ctl && scan->alt && key.r == Kdel) > reboot(); > > + if(key.down){ > + if(key.b == (KF|11)) > + scan->debug = 1; > + if(key.b == (KF|12)) > + scan->debug = 0; > + } > + > if(key.b) > send(keychan, &key); > > after applying that change, run mk install in /sys/src/cmd/aux/kbdfs > and then rebuild the kernel (as kbdfs gets included into the kernel image). > > -- > cinap >