[RFC] Input design
daniel at fooishbar.org
Thu Apr 19 17:19:31 PDT 2007
On Fri, Apr 20, 2007 at 09:42:08AM +0930, Peter Hutterer wrote:
> so how do we specify "all devices"? This is non-trivial.
> The kernel puts all devices into /dev/input. that's nice, and we can
> get hal to send us events when a new device comes in. However, this
> falls short for at least two applications:
> - bluetooth mice connected with hidd don't cause hal events.
> this may be fixed in a newer release of hal (I'm still on dapper),
> but it's annoying nevertheless. In the worst case, this could mean
> that we can't enable bluetooth input devices because the server never
> heard about it. this is...not good.
HAL bug. :)
> - there are devices out there that are prototype hacks
> physical devices (touch, pucks, visual recognition) usually have some
> non-standard way to send events. One system we hacked up simply pipes
> ps2 protocol into a named pipe. it never shows up as a device
> anywhere. it's a hack but it works for what we need. requiring proper
> kernel interaction for each new input device somebody comes up with
> is limiting. 
Surely something like uinput isn't too onerous? In any case, there
could still easily be manual config overrides: this is talking about the
zero-config case, and the interaction with client-side config managers,
> and in addition, if there's multiple servers running on one box
> (multiseat comes to my mind), we have two definitions of "all devices"
Yep, this is the tricky bit.
> so in summary:
> we need a restriction to only allow "sane devices"
Indeed. But you need this restriction _without_ HAL, anyway. It's not
a solved problem yet.
> One thing I could imagine is - by default - don't allow anything
> outside of /dev/input/ or HAL land. But you could explicitely state
> in your config file that you DO want to allow other devices, maybe
> with a regex to the possible paths. We then add new devices by
> sending the path over the wire.
Well, my plan is to only have HAL-blessed input devices added by
default. Anything else can come from the config file or command line.
Given that the multiuser case requires relatively complex configuration
now, this is not a regression. Something like:
Section "InputDevice" # you have this anyway
Option "Name" "Daniel's Mouse"
Section "ServerFlags" # cry me a river
Xomap -mouse /dev/input/whatever -fixeddevicelist
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: Digital signature
More information about the xorg