How to customize input device behaviors?

Alex Stewart foogod at gmail.com
Mon Jun 3 14:16:53 PDT 2013


Hi all,

I've recently started using a Monoprice MP1060-HA60 (aka UC-Logic TWHA60)
graphics tablet, which thanks to the (really cool) DIGImend stuff, worked
right out of the box using the evdev driver on my Ubuntu 13.04 system..

There are a couple of things I'd like to be able to do with it which X.Org
doesn't appear to support by default, though:

a) I'd like to change "mouse" buttons 2 and 3 (the buttons on the pen) to
act as "modifiers" instead of buttons, such that to press the middle button
I would hold down the appropriate pen button and then tap the pen tip (i.e.
button 2 = nothing by itself, button 2+1 = middle click/drag), etc.

b) Use a strip of the tablet active area (for example, the top 3/4 inch)
for a bunch of "soft buttons", which could appear as keyboard keys, (or
extra buttons, or something), which could then be mapped to application
functions.

I've looked around and don't see any software out there that seems to do
either of these things already, so I've started looking at hacking
something up myself. The problem I'm having, however, is that there are so
many levels to the Linux/X input subsystem that it's not clear to me the
best way to go about this sort of thing.

The options I see thus far:

1. Modify the kernel evdev driver

2. Create a userland utility which reads from the actual evdev device and
uses uinput to fake a "wrapper" device which Xorg then reads from instead

3. Modify the Xorg evdev input driver

4. Write a new Xorg input driver specifically for evdev-based tablets

5. Add support for these tablets to the wacom driver, and then add this
functionality to the wacom driver

6. Write a utility which uses Xinput2 to detach the tablet pointer device,
filter the events, and re-insert them using another "fake" device
(basically the same as option 2, but per-user-session inside the X server)

7. Try to add support for this sort of thing to GTK/Qt/etc instead

All of these options seem to have pros and cons, and it's a little unclear
whether there's a "best" or "preferred" way to do the sort of input
filtering I want to do (or if I'm missing something entirely), so I was
hoping there were some folks out there with more experience in this area of
things who might be able to offer some advice on how I should approach this?

-alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20130603/9b8c95e5/attachment.html>


More information about the xorg mailing list