Re: for comment: multi-keyboard patch

Pavel Machek (pavel@bug.ucw.cz)
Wed, 4 Nov 1998 21:44:12 +0100


Hi!

First of all, thanx for your work and I hope that you get it in
2.3.0. I've attached two keyboards to my notebook (one Ps/2 keyboard
in ps/2 mouse port :-), so multiple keyboards are interesting issue
for me.

> I have also hacked the PC and mac low-level keyboard drivers to work
> with the new scheme. Other low-level keyboard drivers should still
> work using some compatibility stuff I put in keyboard.c.
>
> At present input from all keyboards goes to the current foreground
> VC. Ultimately it would be nice to be able to bind a keyboard, screen
> and mouse together into a "console" which would have its own set of
> VCs.

Yes. Still, I would like this patch gets in, since it will make
creating 2 heads for one computer much more easy.

> Comments, anyone?

Yes:

> -void handle_scancode(unsigned char scancode)
> +static void kbd_repeat(unsigned long devid)

Maybe you should note somewhere that you are changing autorepeat
behaviour. Does this correspond with Russel King's patches?

> + if (ks->repeat_timer_running) {
> + del_timer(&ks->repeat_timer);
> + ks->repeat_timer_running = 0;
> + }

I think it is safe to just del_timer(&ks->repeat_timer) without
needing to check anything. Ask arca if unsure.

> static unsigned char ledstate = 0xff; /* undefined */
> static unsigned char ledioctl;
>
> -unsigned char getledstate(void) {
> - return ledstate;
> +unsigned char getledstate() {
> + return ledstate;
> }

What sense does this piece of code have? I thought that keyboard leds
should be independend for each keyboard...

I'm going to actually try your patch now, and maybe integrate it with
this one. Please get this into kernel ASAP.

Pavel

-- 
I'm really pavel@atrey.karlin.mff.cuni.cz. 	   Pavel
Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/