xinput does not remap buttons anymore

Bug #106383 reported by Arno Teigseth
4
Affects Status Importance Assigned to Milestone
xinput (Ubuntu)
Fix Released
Undecided
Arno Teigseth

Bug Description

Binary package hint: xinput

"Right-click" with stylus does not work in feisty but used to in Edgy. This is about a tablet [PC].

I used 'xinput set-button-map 1 3 2' to be able to right-click tappng the stylus while holding down the button on the stylus. It did work in edgy.
I just updated to feisty. I think it worked actually, in the beginning. Sorry I can't tell exactly. The first thing I installed was xinput (had my self-written howto from edgy). But then (update?) suddenly it didn't anymore.

My guess is something bad happened with xinput/wacom cooperation. No matter what order the numbers after 'xinput set-button-map' has, "right-clicking" with the pen always "middle-clicks" (paste the selected text, ususally).

The exit value of xinput is 0 (ok) in all possible combinations of the three values. But the behaviour of the stylus remains the same. Middle-click when holding down the little button, left-click when not.

I would call this a bug. But I don't know in what package, or what to test next. Logs doesn't tell me much.

Revision history for this message
Gaiwecoor (gaiwecoor) wrote : Possible Fix

I had the same problem after upgrading to 7.04, but I think I've found the fix. I can't say I fully understand it, as I am relatively new to linux, but it seems to work.

After comparing my Edgy xorg.conf to my Fiesty xorg.conf (I'll just call them e.conf and f.conf, for simplicity), I noticed a couple of lines missing from f.conf:

====== From: f.conf ======
Section "InputDevice"
 Driver "wacom"
 Identifier "stylus"
 . . .
 Option "Button2" "3" # Inserted from e.conf
EndSection

Section "InputDevice"
 Driver "wacom"
 Identifier "eraser"
 . . .
 Option "Button1" "2" # Inserted from e.conf
EndSection
====== End file snippet ======

After restarting X, adding the Option "ButtonX" "Y" lines seemed to fix it for me. I can now right-click away.

Hope that helps!.

 - Gaiwecoor

Revision history for this message
Arno Teigseth (arno-teigseth) wrote :

You'd probably be better off using xsetwacom. It will set the buttons right and you can easily set rotation and other things after you used xrandr to rotate your display.

I just found out I can even right-click without even touching the tablet!

http://linuxwacom.sourceforge.net/index.php/howto/xsetwacom

xsetwacom set stylus Button1 1
xsetwacom set stylus Button2 3
xsetwacom set stylus Button3 2
xsetwacom set stylus Rotate CW

etc

give it a try

Revision history for this message
Arno Teigseth (arno-teigseth) wrote : Re: xinput does not remap buttons anymore (SOLVED)

I finally made wacom setup on feisty work:

did System | Preferences | Session and added to the session the following script
---------------
xsetwacom set stylus TPCButton off
xsetwacom set stylus Button1 1

# This is tap with the pen on screen. 3 is right-click, 2 is middle, 1 is normal click
xsetwacom set stylus Button2 1

# This is hover-button on the pen. 3 is right-click, 2 is middle, 1 is normal click
xsetwacom set stylus Button3 3
-----------------

Now this works much better in Windows - I don't even need to put down the stylus on the tablet to be able to right-click. I can just press the button on the pen, hovering it close to the screen!
If you want to disable that function (having to press the stylus button AND tap the screen, to right-click), specify TPCButton on.

Revision history for this message
Arno Teigseth (arno-teigseth) wrote :

there are different approaches.
1) Gaiwecoor points to editing the xorg.conf. That is a system-wide configuration. Could work, but it didn't for me.
2) I tried and erred a lot with xsetwacom, the biggest problem was to make it run on x startup time. I use Gnome and therefore made a script and added it to the session startup list. A personal preference, but it can be made global by moving the script and adding it to the default gnome session.

Changed in xinput:
assignee: nobody → arno-teigseth
status: Unconfirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.