Subject: why (was Re: src/sys/arch/pmax/dev/lk201.c question
To: None <djv@bedford.net>
From: Dan McMahill <mcmahill@mtl.mit.edu>
List: port-pmax
Date: 03/14/1998 12:15:02
In message <199803141144.GAA29042@lucy.loco.net>, CyberPeasant writes:
>> 
>> I have a question about a piece of the code in src/sys/arch/pmax/dev/lk201.c
>> 
>> I suppose its actually somewhat of a hardware question since the code talks
>> to the hardware.  If anyone has some more detailed LK201 hardware docuemntation
>> which would explain this, I would really appreciate a copy.
[snip]


>> static u_char kbdInitString[] = {
>>         LK_LED_ENABLE, LED_ALL,         /* show we are resetting keyboard */  
>>         LK_DEFAULTS,
>> 
>> // I don't understand from here to
>> 
>>         LK_CMD_MODE(LK_AUTODOWN, 1),  
>>         LK_CMD_MODE(LK_AUTODOWN, 2),  
>>         LK_CMD_MODE(LK_AUTODOWN, 3),  
>>         LK_CMD_MODE(LK_DOWN, 4),        /* could also be LK_AUTODOWN */
>

>Well, changing this to LK_AUTODOWN changes RETURN UP and DOWN ARROW
>to autorepeat, but breaks some other stuff. Then the X-server, when
>started will change it back. :/  Sure wish I had a h'ware spec.
very interesting...

>(I'm using OpenBSD -- same code, though.  Some of the code in lk201.c looks
>very strange.  There's one routine (lkbdMapChar, farther down in that
>file) that I put a panic() call in right at the start ... hmm, kernel
>ran fine.
thats strange too.  There is a comment that says that routine should be
replaced, maybe it has and the old code was just left for reference?

>my guess is that banks of keys (defined how??) are being given attributes
>here.
my guess too.


>Could I ask why you're messing with this?
I really hate my LK201, I got a LK401 which is better, but I still don't
like it that much (picky, picky..).  I have a Kinesis keyboard which
I really like, but it is a PC keyboard.  So I have decided to build
a converter box which makes a PC keyboard look like an LK201 to the
computer.  I have the PC interface part worked out (I think), I have
the LK201-> computer direction figured out, I'm just trying to figure
out what the keyboard is supposed to do in response to the various
things the computer may send it.  If it does control things like
key repeat, I'd like to figure that all out.

My hope was to make it transparent enough so any OS on the computer
would just believe its an LK201 and not get confused.  If I have to,
I will ignore as much stuff as NetBSD will let me get away with and
hope that other OS's will not mind either.

-- Dan