InputOverhaul

Input Overhaul

Why?

Input is an unmitigated disaster. Aside from the horrific complexity of XKB, it's just a mess. We've already solved one problem (that of bad event generation) with input-hotplug, but we still have a number of fundamental problems. While attempting to make HAL work, it's become increasingly clear that we more or less need to start again.

Now?

XFree86 and KDrive have their own (bad) input systems, each dealing with options, the need to load an XKB keymap, a bad abstraction around deviceProc, input drivers, and so on, and so forth. DeviceIntRec is strictly limited to a representation of which devices are in the DIX right now: everything in the DDX uses KdPointerInfo/KdKeyboardInfo/KdConfigPointer/KdConfigKeyboard (KDrive), or InputInfoRec/IDevRec (XFree86). These both hold the DeviceIntRec, and pass that to the DIX.

KDrive's separation of input devices into separate pointers and keyboards is an immense loss.

What?

Move most of the (common to all implementations) initialization code down to the DIX. Extend DeviceIntRec to include options, so we can get at these options from the DIX (two primary purposes: first, let HAL know which device is associated with UDI, and secondly, allow a generic property implementation that's better than the current ioctls). Get rid of deviceProc, and replace it with init/enable/disable/fini hooks, because we've never used deviceProc for anything else.

Proposed API

The proposed API is inspired by the current KDrive and XFree86 interfaces.