[PLUG] Remapping buttons in X windows

Keith Lofstrom keithl at kl-ic.com
Mon Feb 9 22:12:01 UTC 2004


X windows question.  

I am using Win4Lin to run a @$%##! windoze program, mea culpa.  The
windoze program works best with a three button mouse, but will work
with a two-button spanning kludge; if you hold down ALT while you
press the left mouse button, the program will pretend it is seeing
the middle mouse button.  The current version of Win4Lin only passes
info for two buttons, so I am using this kludge a lot.  The problem
comes in when the program also expects SHIFT and CTRL as modifiers;
it is like playing a game of Twister on my keyboard.

I believe it is possible to remap mouse buttons in X, but I do
not know how.   What I would like to do is translate middle
mouse button to ALT&leftbutton when I am in the Win4Lin window,
leave it alone elsewhere.  

I will settle for a script that sets up the translation, and another
that removes it, when I fire up that program.  This may involve
fiddling with xmodmap and xev, but hopefully somebody has already
done something like this and can save me some frobbing.  I am
usually running gnome, if that makes any difference.

Keith

-- 
Keith Lofstrom           keithl at ieee.org         Voice (503)-520-1993
KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs




More information about the PLUG mailing list