[Y-devel] User Device Input Architecture

Brent Gulanowski brentg at magma.ca
Thu Feb 26 18:57:43 GMT 2004


I have tried to summarize various ideas for the design of a user input 
system, partly modifying/extending what people have been discussing. I 
was working on a kind of design spec thing and this came out of it.

A complete user input system to manage devices might offer the 
following high-level architectural features:

- A modular, layered user input processing system which abstracts input 
devices into logical and wire-level devices, within the capabilities of 
the host O/S.
- Universal input device support.
- Arbitrary mappings of wire-level (or driver-level? depends on O/S) 
devices to sets of wire-level input elements: keys, buttons, wheels, 
axes, what-have-you..
- Support for virtual devices, whereby software can emulate a 
wire-level device.
- Standardized logical input objects: state-based objects with binary 
(0/1) or continual state values (ranging from -1.0 .. 0.0 .. 1.0, or 
just 0.0 .. 1.0). For example, a mouse ball has two states: horizontal 
and vertical rate of motion.
- Logical input devices: collections of logical input objects. For 
example: a mouse offers both motion information (direction and speed) 
and location in {x,y} co-ordinates.
- A software layer to manage mapping of input elements and devices to 
logical input objects.
- A software layer to manage sets of input objects and their 
translation into event objects for use by the desktop environment 
(windows and widgets).

This is mostly in response to the idea that a keyboard is less a single 
device than it is a collection of keys, which are basically just on/off 
switches. Logically, they are no different from the buttons on a mouse 
or a joystick. Likewise, track balls, mouse balls or optical sensors, 
mouse wheels, and joy stick continual devices all share the common 
feature of a range of values, which basically provide a cartesian 
space. So, there are really only two logical input controls: buttons 
(on/off devices) and sliders (continual devices which can be mapped to 
a range, either -1..1 or 0..1).

While there are thousands of virtual buttons needed to produce all of 
the characters in unicode, it has been shown that an input processing 
system can accept a string of input and convert that to a single 
character -- in effect, it is converting a series of real button 
presses into a single logical button press. Similarly, but mostly 
theoretically, any two slider-type input devices can be used to produce 
mouse-style 2D-vector movement, and this can be extrapolated to 3D or 
whatever. The reverse is also true: the mouse's up/down and left/right 
components can be extracted and used in some other way.

It would be great if the input manager was good enough to be perfect 
for every application, but probably some software would rather talk to 
devices at the driver level or even at the wire level directly. I guess 
they can use the host operating system to do that anyway. Not sure if 
it would make sense for Y to duplicate that or not, possibly by 
providing standardization.

One thing I'm not clear on is whether Y would actually require 
different device drivers over and above those used by the host O/S. I 
would think probably not, but that driver communication would still be 
considered low level enough to need logical interpretation to conform 
to a standard logical input object model (again, a logical input object 
is a logical button or slider which represents some combination of 
states of one or more actual input controls -- keys, buttons, wheels -- 
and not entire devices). The driver-to-logical conversion is a simple 
state machine (or set of machines), treating sequences of control state 
changes as strings of input tokens, and outputting new strings of 
logical object state changes on accept. If it is a single machine, it 
is a modified machine, with the accept states numbered and 
corresponding to a table of logical devices. Actually, a state machine 
might only work for buttons. Continual controls might require something 
more sophisticated in order to pass on a numerical value.

I hope these observations are of some use.

Cheers,

--
Brent Gulanowski                                brentg at magma.ca




More information about the Y-devel mailing list









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