0

I just got an HP 2710p (hp tablet, with digitizer), and I've played around with linux for a while now, and thought I would go ahead and install it. Everything works fine, excepting normal tablet functions, which is to be expected. I'm working on the screen rotation, and there are on-screen keyboards, etc, but I'm having issues with the stylus.
I can tap and left click with the stylus as normal, but the side button (which in windows functions as a right mouse button) appears as a 'button 2' to xev (a middle/scroll wheel button). I can switch 'button 2' and 'button 3' universally using xmodmap, but I'd like to do so exclusively for stylus so I don't screw up regular pointing devices.
Altering xorg.conf (which is surprisingly bare) with the recommended sections (adding sections for each of the stylus buttons) does nothing.
I'm running crunchbang, which is an ubuntu/debian varient with openbox as the windows manager.
Thanks

Also, as a seperate note, does anybody know how to detect when I rotate and/or latch the lid shut? I was thinking maybe I could run a script to switch the buttons when I close it, but I can't find any information.

1 Answers1

2

Since you're already familiar with xmodmap, this shouldn't be too difficult. Have a look at xinput. Unlike xmodmap, this lets you specify a device for which you want the remapping.

  • Run xinput list to get a list of devices
  • Get the name for the sylus
  • Remap the buttons for that device using xinput set-button-map "StylusName" 1 2 3 etc

Check this Ubuntu community document for an example of how it's used to remap mouse buttons.