Re: Keyboard delay and repeat rate

From: Vojtech Pavlik (vojtech@suse.cz)
Date: Thu Apr 06 2000 - 16:09:07 EST


On Thu, Apr 06, 2000 at 09:27:38PM +0200, Guest section DW wrote:
> On Thu, Apr 06, 2000 at 01:07:10PM +0200, Vojtech Pavlik wrote:
> > On Thu, Apr 06, 2000 at 12:25:27PM +0200, Guest section DW wrote:
> >
> > > Scancode mode 3 is totally unusable since
> > > (i) most keys do not generate a break code, not even right Ctrl and Alt,
> > > so it is impossible to make key combinations like AltGr-x.
> >
> > Simply not true. Most likely your i8042 is still switched into AT->XT
> > translating mode and is mangling the Set 3 into unusable garbage. You
> > can see the elegance of Set 3 only after you switch it to direct mode.
>
> You are mistaken. Please check your facts before replying.
>
> [I gave the facts in
> http://www.win.tue.nl/~aeb/linux/kbd/scancodes-3.html#ss3.2
> In case anything there is wrong, please give detailed corrections.
> My statements are true for the keyboards I have here.]

Syslog:

serio0: i8042 KBD port at 0x60,0x64 irq 1
serio1: i8042 AUX port at 0x60,0x64 irq 12
input0: AT Set 3 keyboard on serio0
event0: Event device for input0

Testing (pressing altgr-x):

vojtech@sunrise:~/input$ ./evtest /dev/input/event0
Testing ... (interrupt to exit)
Event: time 955054886.999621, type 1 (Key), code 100 (RightAlt), value 1
Event: time 955054887.121646, type 1 (Key), code 45 (X), value 1
Event: time 955054887.182110, type 1 (Key), code 100 (RightAlt), value 0
Event: time 955054887.194796, type 1 (Key), code 45 (X), value 0

Btw, don't be mistaken by the codes - those are keycodes after remapping
from Set 3, thus close to Set 1 which Linux keycodes are based on.

It *works*. In case you'd like to see a full (commented) log of bytes
sent to and from the i8042, I can provide that as well.

I think I know where your problem stems from. You have to explicitely
*enable* break codes in Set 3 by issuing the ATKBD_CMD_SETALL_MB (0xf8)
command.

You can also enable repeat by the 0xfa command if you want, but my
drivers do autorepeat in software, because too many keyboards (non-AT -
USB, Sun, Amiga, whatever) don't have it and thus it's needed and some
AT keyboards (Toshiba notebooks) have problems with autorepeat, so I use
the software one even on AT keyboards.

-- 
Vojtech Pavlik
SuSE Labs

- 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/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:17 EST