Subject: Re: ADBisms..
To: Alex Zepeda <garbanzo@hooked.net>
From: Colin Wood <cwood@ichips.intel.com>
List: port-mac68k
Date: 07/28/1999 20:25:51
Alex Zepeda wrote:
> One of the things I noticed when I first tried out NetBSD, was that the
> LEDs on my keyboard (Extended Keyboard II.. I *LOVE* this thing) wouldn't
> really do anything under NetBSD. So I sorta made it my mission to get
> them to work. 'Course the majority of this was un ifdefing some code, and
> properly initializing some variables. And now, the caps lock LED truely
> indicates whether caps lock is enabled..
so my little LED routines actually work? that's good to hear. the reason
why they're currently #ifdef'd out is that they were causing some
interesting hangs on my system the last time i looked at it. it didn't
happen all the time, but sometimes it just wouldn't come back...yuck!
> I did a little further poking around and grabbed some keycodes for the
> power switch and the other "lock" keys. And the next step will be to prod
> the current key state from the keyboard and set the LEDs accordingly (I
> wish MacOS did this). But this leaves a few questions.
>
> Scroll Lock is over F14, and Num Lock over clear; should I even bother
> with those?
well, i wouldn't really bother, since i'm not too sure what the proper
sequence is to even get scroll lock or numlock, even under macos.
> I'm also looking for someone with a "standard" keyboard to test this, as
> I'm curious how a non extended keyboard would react to the frobing of
> register 2.
i'd really suggest that you wrap all the LED frobbing code with an
if ((sc->origaddr == ADBADDR_KBD) && (sc->handler_id == ADB_EXTKBD)) {
}
otherwise you might wind up doing something a little screwy.
later.
colin