Re: Keyboard delay and repeat rate

From: Geert Uytterhoeven (Geert.Uytterhoeven@sonycom.com)
Date: Wed Apr 05 2000 - 03:09:25 EST


On Tue, 4 Apr 2000, Russell King wrote:
> David Balazic writes:
> > Rik Faith wrote:
> > > It's been a number of years, but my understanding was that the keyboard
> > > controller chip detected a lengthy key-down state and then started to send
> > > fake key-up and key-down messages until the key was actually raised. This
> > > is why the delay and rate depend on the keyboard controller chip.
>
> I'm sorry, I don't have Rik's email to reply to.
>
> The PC keyboard sends a key-down code when the key is initially pressed.
> After the repeat delay, it sends another key-down code, which repeats at
> the repeat rate until the key is released. At this point, it sends a
> key-up code. Really, it makes more sense to call these codes "events".
>
> When you have a tty open, the characters that you read from the device depend
> on the mode that the VC is in. Eg, in RAW mode, you see the raw codes from
> the keyboard. These (should be) untranslated, and may be architecture
> specific (the "scancodes"). However, if the VC is in MEDIUM mode, you get
                                                        ^^^^^^
                                                        COOKED
> the ASCII characters.
>
> There is a third mode, MEDIUM RAW which returns "key codes". Key code may
> be translated scan codes, or may just be the raw scan codes themselves.
> They may have other processing performed on them as well.

Keycodes are bytes where the MSB indicates key up or down. For each keyboard
event exactly one keycode is sent, while there may be multiple scancodes for a
keyboard event (e.g. on PC, where extended keys are prefixed). On Amiga,
keycode == scancode.

Gr{oetje,eeting}s,

                                                Geert

--
Geert Uytterhoeven ------------- Sony Software Development Center Europe (SDCE)
Geert.Uytterhoeven@sonycom.com ------------------- Sint-Stevens-Woluwestraat 55
Voice +32-2-7248638 Fax +32-2-7262686 ---------------- B-1130 Brussels, Belgium

- 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:14 EST