|
|
Subscribe / Log in / New account

Blog series on XInput 2

Peter Hutterer has published a three part blog series (part 1, part 2 and part 3) on X11's XInput 2. "XI2 is now merged into master. Over the next couple of days, I will post various recipes on how to deal with the new functionality. The examples here are merely snippets, full example programs to summarize each part are available here." (Thanks to Paul Wise).

to post comments

Blog series on XInput 2

Posted Jun 18, 2009 23:09 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link] (6 responses)

Looks nice. But when is it going to be used by GNOME and KDE?

Blog series on XInput 2

Posted Jun 18, 2009 23:09 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link] (5 responses)

Also, does XI2 support keyboards with more than 256 keys?

Blog series on XInput 2

Posted Jun 19, 2009 0:48 UTC (Fri) by whot (subscriber, #50317) [Link]

yes. XI2 supports 32 bit keycodes.

Blog series on XInput 2

Posted Jun 19, 2009 0:55 UTC (Fri) by alecs1 (guest, #46699) [Link]

I hope so. As far as I observed (I may be wrong) there are two ways to overcome silly limitations, adding extensions and bumping the version to X12: http://www.x.org/wiki/Development/X12 . I hope I live to see this second option used also.

Blog series on XInput 2

Posted Jun 19, 2009 7:03 UTC (Fri) by eduperez (guest, #11232) [Link] (2 responses)

More than 256 keys!? Just for curiosity, do those exist?

Blog series on XInput 2

Posted Jun 19, 2009 8:07 UTC (Fri) by arekm (subscriber, #4846) [Link]

I have keyboard with less than 256 keys but some keys produce keycodes bigger than value 256, so xi2 is the only sane (remapping is instane) way to handle them.

Blog series on XInput 2

Posted Jun 19, 2009 11:43 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link]

Yes, they do exist.

However, the common problem is that a lot of quite common keyboards have additional keys which emit keycodes>256.

Blog series on XInput 2

Posted Jun 19, 2009 8:59 UTC (Fri) by dgm (subscriber, #49227) [Link] (1 responses)

First of all, I just had a quick read of the blog entries, so my opinions are not very strongly based.
That said, I'm not completely comfortable with this extension.
I fail to see it mapping cleanly to multi-touch devices, and I think we are going to see more and more of those. Also, why have pointers and keyboards to be paired?
By the way, "master" and "slave" sounds odd. "router" and "source" would be more appropriate (I think those words are event used somewhere to explain their relationship).

Blog series on XInput 2

Posted Jun 19, 2009 10:06 UTC (Fri) by tialaramex (subscriber, #21167) [Link]

Pointers and keyboards need to be paired because "a keyboard and pointer" is the abstraction to which existing applications are written. Of course you could reject this abstraction, but Xi2 isn't about a radical change to the way all the world's GUI applications are written, but just improving the X server.

The _physical_ hardware for this abstraction could be just a touchscreen used with a virtual keyboard. Abstractions are always a bit leaky, but as much as possible the developer shouldn't need to know that I prefer a trackball, and an AT keyboard or if I have an experimental holographic touchscreen interface.

Multi-touch is probably NOT best approached as if the user had two (or three, or five...) mouses connected to USB ports. The same blog has a post about this. When I use two fingers to "squeeze" on a multi-touch pad, that's really not two separate events which just happen to be mediated through a single piece of hardware - it's clearly only one event, but emitting something more complicated than a single (x,y) location. This is nothing new - there have long existed devices which emit (x,y,z) with z pressure, and sometimes also a twist or an additional analogue input (trigger pressure).

Blog series on XInput 2

Posted Jun 19, 2009 10:18 UTC (Fri) by k3ninho (subscriber, #50375) [Link] (2 responses)

The first post tells me that keyboard+mouse are an arbitrary pairing, putting a pointer and keyboard focus together. I use my laptop with a mouse and don't disable the touch pad: why can't I have a mousing focus, without a keyboard associated with it, for the touchpad?

Blog series on XInput 2

Posted Jun 19, 2009 10:43 UTC (Fri) by mjthayer (guest, #39183) [Link]

I imagine you can create a second virtual keyboard-mouse pair, associate the touchpad to the mouse and leave the virtual keyboard "empty".

Blog series on XInput 2

Posted Jun 19, 2009 15:47 UTC (Fri) by iabervon (subscriber, #722) [Link]

Pointers don't have focus. Moving your printer always causes the pointer to move, and clicking buttons always causes a click at the location of the pointer. Keyboards have focus, because typing a key causes the key to be sent to some window. Pointers also have the association with keyboards so that, when you click the button or something, you can be holding down Ctrl.

If you wanted, you could have two pointers, where the mouse controls one pointer and the trackpad controls the other pointer, and the keyboard sends key presses to the application that the mouse has selected, but the trackpad can only point and click.

Note that you can have more than one physical device that moves a single pointer or issues key presses for a single keyboard, which is what people more frequently want.

Blog series on XInput 2

Posted Jun 19, 2009 12:49 UTC (Fri) by ikm (guest, #493) [Link]

I'd be much more happy to hear that the not so recently broken RECORD extension got fixed instead.


Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds