9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bakul Shah <bakul@bitblocks.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] German USB keyboard on Raspberry Pi
Date: Wed, 24 Apr 2013 13:56:02 -0700	[thread overview]
Message-ID: <20130424205602.D6E59B82A@mail.bitblocks.com> (raw)
In-Reply-To: Your message of "24 Apr 2013 21:25:13 +0200." <51783199.5080909@ruhr-uni-bochum.de>

On 24 Apr 2013 21:25:13 +0200 "Holger Sebert" <Holger.Sebert@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	other threads:[~2013-04-24 20:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-20 16:31 Holger Sebert
2013-04-20 19:14 ` Bakul Shah
2013-04-20 20:08   ` Holger Sebert
2013-04-20 23:18     ` Bakul Shah
2013-04-24 19:25       ` Holger Sebert
2013-04-24 20:56         ` Bakul Shah [this message]
2013-04-25 20:38           ` Holger Sebert
2013-04-25 20:41             ` erik quanstrom
2013-04-28 20:01               ` Holger Sebert
2013-04-28 21:07                 ` Bakul Shah
2013-04-30 12:59                   ` Holger Sebert
2013-04-28 21:14                 ` Richard Miller
2013-04-30 13:05                   ` Holger Sebert
2013-04-30 14:16                     ` Richard Miller
2013-05-03 12:30                 ` arisawa
2013-04-26  7:07             ` Yaroslav
2013-04-26 12:02               ` erik quanstrom
2013-04-26 12:34                 ` Richard Miller
2013-04-26 12:36                   ` erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130424205602.D6E59B82A@mail.bitblocks.com \
    --to=bakul@bitblocks.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).