Why are there keyboards and pointers? Why not just an input device?

Peter Hutterer peter.hutterer at who-t.net
Thu Oct 6 15:07:03 PDT 2011


On Thu, Oct 06, 2011 at 01:41:07PM +0200, Michal Suchanek wrote:
> maybe this is a stupid question but why do we have keyboard and mice
> attached as different kinds of devices?
> 
> Since mouse events can be mapped even to plain keyboards and many mice
> have keys or buttons that would like to pretend to be keys what is the
> benefit?

the core protocol forces a pointer/keyboard distinction. And the input
extension does so too (since 1.4, I think). So you need to keep this
distinction around for backwards-compat anyway.

The really tricky bit to handle is to handle pointer/keyboard grabs on
devices, especially combined devices that are both mouse+keyboard. you still
need both grabs to work independently from the view of the core protocol.

during the MPX work a few years ago I actually tried to remove the
distinction to just have one master devices that slaves are attached to.
well, didn't work out too well, it was a lot of work and eventually I gave
up.

> The obvious drawback is it crashes the X server a lot.

that's a bug, can usually be worked around.

Cheers,
  Peter


More information about the xorg-devel mailing list