[Y-devel] Logical input devices

Rupert Mazzucco maz at ap.univie.ac.at
Sun Feb 29 15:35:43 GMT 2004


> I do not agree with you guys that there should be no difference
> between analog and digital events. [...]

I agree with Maurice here.  Analog and digital events are different
enough from each other, let's make that two different input methods
and concentrate for now on an input module that handles digital events.

> > But the important question is, should the logical device generate
> > the repeated events (like actual hardware keyboards do due to
> > historical reasons) or should the repeation be done only by
> > character input driver.
>
> I suppose it would also be useful to check how it is done by X,

I'm not going to look at the source of that thing ever again (I hope),
but xev reports repeated events for normal keys and no repeating for
modifiers.  I wonder if hardware repeating can be turned off by the
hardware driver?  (By that I mean not our layer 1, but eg the Linux
input driver.)

> but if I had to choose I would probably move the whole thing into
> the driver or maybe even higher up in the software. You'll have

I think that belongs in layer 2.

> What kind of configuration are you talking about?
> (I'll limit myself to keyboards and buttons for now)
> At the driver level each key of each type of device generates
> a virtual key code that can only be the same as any other if
> they have a corresponding conceptual position (such as "the key in
> the top right corner of the keyboard").
>
> On a higher layer the keymap would determine for each virtual key
> code how it changes the state in the tree. Once a virtual key moves
> the state to a leaf, a character string is generated.
>
> Naturally some tools would have to be made to support both the
> creation of a mapping between a new device's scan codes and its
> virtual key codes [layer 1], and the mappings between key code sequences
> and character sequences (keymaps) [layer2].

I think our views on the design have pretty much converged.  I inserted
the [..] to indicate what I was talking about above.  We should adopt the
convention to refer to the real hardware driver as "layer 0".


Regards,
Rupert




More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved