On 24 Apr 2013 21:25:13 +0200 "Holger Sebert" 
<holger.seb...@ruhr-uni-bochum.de> 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.

Reply via email to