From mboxrd@z Thu Jan 1 00:00:00 1970 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: Your message of "24 Apr 2013 21:25:13 +0200." <51783199.5080909@ruhr-uni-bochum.de> References: <5172C2C6.5020202@ruhr-uni-bochum.de> <20130420191411.47FD5B834@mail.bitblocks.com> <5172F5A0.8070507@ruhr-uni-bochum.de> <20130420231810.B50B7B82A@mail.bitblocks.com> <51783199.5080909@ruhr-uni-bochum.de> Date: Wed, 24 Apr 2013 13:56:02 -0700 From: Bakul Shah Message-Id: <20130424205602.D6E59B82A@mail.bitblocks.com> Subject: Re: [9fans] German USB keyboard on Raspberry Pi Topicbox-Message-UUID: 480a1382-ead8-11e9-9d60-3106f5b1d025 On 24 Apr 2013 21:25:13 +0200 "Holger Sebert" wrote: > > I have tried it out: The driver says > "sc: e0 56" when pressing the "<"-key. This means a two char sequence: e0, 0x56 is stuffed into the kernel device kbin. Ultimately thsi will map to the value in kbtabesc1[0x56]. Now kbtabesc1 is table 2 in a kbmap so we are looking for an entry that starts with 2 86 ... # 86 == 0x56 In /sys/lib/kbmap/de I see 2 86 0 This explains why you don't see anything. What you want to do is to copy this file to, say, de2 and replace the above with 2 86 '< And then put the following in $home/lib/profile cat /sys/lib/kbmap/de2 > /dev/kbmap Probably under 'case terminal'. Repeat this analysis for other keys that don't work right. I did a quick reading so may have missed something but hopefully you can follow the code yourself now. You will have to look at the following files /sys/src/cmd/usb/kb/kb.c /sys/src/9/port/devkb*.c /sys/src/9/omap/kbd.c (what 9/bcm/kbd.c points to) > This is nice! However, I have no idea how > to put this (extended?) scan code into > the kbmap-file. The naive try: > > 0 0xe056 '< This won't work. The first item selects a scanmap (a 128 element array). The second item is an *index* into this array. The third item is the Rune that goes in that slot. See kbmap.c to find the mapping between table number and a kbtab* array.