summaryrefslogtreecommitdiff
path: root/Development/InputOverhaul.mdwn
blob: 81f91c310d5af2934e8c72553793c38075866a29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25


# 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|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|KdPointerInfo/KdKeyboardInfo/KdConfigPointer/KdConfigKeyboard]] (KDrive), or InputInfoRec/IDevRec (XFree86).  These both hold the [[DeviceIntRec|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|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.