Until now the pad was the only thing that didn't work for my Wacom Graphire4 on Linux. For the Intuos3 exists a small application expresskeys. I decided to adapt this tool.

The Tool

As the Intuos has a quite different button setup compared to the Graphire4 I decided to use expresskeys as a base but instead of adding the functionality for the Graphire4 , removing the Intuos3 stuff.

A preliminary 0.1.0 version (which works for me) is downloadable here: gr4_buttons-0.1.0.tar.gz.

Most of the files still refer to expresskeys (and maybe these changes will be included there).

Installing

Unpack the file, run ./configure; make and maybe make install as root if you want to install it.

Running It

If I refer to Your_Pad you have to substitute that with the identifier that is defined in your X configuration (usally xorg.conf. There you have an InputSection like this somewhere:

Section "InputDevice"
  Driver        "wacom"
  Identifier    "Your_Pad"
  Option        "Device" "/dev/input/wacom"
  Option        "USB" "on"
  Option        "Type" "pad"
EndSection

Use whatever name you defined there.

The First Time

Call gr4_buttons Your_Pad (replace Your_Pad with the name of the device defined in the X configuration) and kill it hiting Ctrl-C. This way you get the standard ~/.gr4_buttons/gr4_buttons.conf.

The Configuration

The top documentation still is for expresskeys but if you want to add a special configuration for another program, copy the block below and be aware that this is untested!.

The standard configuration looks like this:

00 Program Name:          "default"
01 Scroll Wheel Up:        994
02 Scroll Wheel Up Plus:   0
03 Scroll Wheel Down:      995
04 Scroll Wheel Down Plus: 0
05 Left Button:            64
06 Left Button Plus:       0
07 Right Button :          37
08 Right Button Plus :     0

This configures the scroll wheel to send mouse button 4 on an up move and mouse button 5 on a down move (994 and 995 are virtual key codes to send buttons of the core pointer and button 4 and 5 are the signals of my mouse for the scroll wheel: have a look at the ZAxisMapping option of your core pointer in the X configuration). The left button sends Alt and the right one Control. Actually I don't have a good use for them now. If you don't want a signal, set them to 0.

Testing It

Run it with gr4_buttons Your_Pad -v and it will show what happens.

Running It Really

Run it with gr4_buttons Your_Pad -d. This is the daemon mode. All you have to do now, is to setup an auto-run for X (add it to session management of GNOME, autostart for KDE, or include it into .xinitrc.

ToDo

If I'll develop this small thing further, I'd like to change the configuration file format and I'd like to have a fallback mode, if you don't give a pad name: just use one found in X (the first one). A test if a Graphire4 is available would be nice as well. Maybe one could even fetch the ZAxisMapping of the core pointer and use the buttons found there as default configuration for the wheel.

Many Thanks

Many thanks go to the developers of expresskeys (Mats Johannesson and Denis DerSarkisian) and all the autors of the linuxwacom project.

12 Comments

Thank you! Seems to work just fine! =)



Don't hesitate to develop this further...

I'm very glad it works for you as well! WFM for quite a while now so I consider it stable. I even stopped using the mouse... ;-)



I'd really like to change some things but I've too many other things I like to do as well (esp. in summer time ;) and these things are not user related anyway.



BTW I'm still hoping that someone integrates this functionality into the driver for X (where it belongs, IMO)...

Thank you so much!

The only issue I had was that when I scrolled the button up, the screen scrolled down, and vice-versa. I just exchange the 994 for the 995 and now works fine for me.



Thank you again! Wonderful work!



Cheers!

Yes, this may happen because the codes are specific to the used mouse unfortunately...



But this helper is obsolete anyway as expresskeys now support the graphite and it seems further, that future version of linuxwacom will integrate this .

Nice wørk! Works like a charm on my SuSE 10.1 (kernel 2.6.16.21-0.13-default)... My Graphire2 drank too much coffee and this extension was the only I had to add to get the new Graphire4 I bought fully operational!



Thanks! Thanks! Thanks!

Thanks for this.



Stumbled upon it while looking for a way to get the express keys and scroll wheel of my Graphire4 working in Ubuntu.



This works perfectly! Thanks.

huh? I don't find any " pad " option in my graphire, all I find is: stylus, cursor, eraser



that's it. So I'm kinda confused now, uuhh,...any help? ^^;

Thank you very much! Great work!



Wasn't quite sure how long it would take to get my Graphire to work under Ubuntu, but I didn't imagine this could be done in about half an hour. Thanks!

@Missie: You have to add the following code to your xorg.conf:



Section "InputDevice"

Driver "wacom"

Identifier "pad"

Option "Device" "/dev/input/wacom"

Option "Type" "pad"

Option "USB" "on"

EndSection



Further you have to add the line



InputDevice "pad"



in the section "ServerLayout".

Thers is a solve for this problem. Works at least for xorg 7 and linux-wacom 0.7.4



http://gentoo-wiki.com/HOWT...

It segfaults for me with a Graphire 4 when I press the last button (the one on the right). Turns out, the fix was easy. With verbose mode, it reports button number = 10, which your code doesn't check for, so I just added a "case 10:" line before all lines with "case 13:".



It's great now — thanks for your work! :-)

I also get a segfault with the right button. To which file do I need to add "case 10:"?



with thanks

I had the same issue as Mihai and Laharrin, and used the same solution as Mihai.



@Laharrin: you need to add "case 10:" on a seperate line before both places that say "case 13:" in event_loop.c (unzippedfolder/src/event_loop.c)