[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xfree-xpert
Subject:    Re: [Xpert]Getting additional mouse buttons to do something useful
From:       Henrik Sandklef <henrik () sandklef ! com>
Date:       2002-05-20 7:05:37
[Download RAW message or body]

HI!

1 grab the button
2 do a while loop where you poll for events
3 fake whatever you like with XTest


Here's some pseudo code

XGrabButton (...)
while (XGetNextEvent( ..., ev, ..))
{
	switch (ev)
	...
	XFakeKeyEvent( ... )
}


I've writtn a program that does "the inverse" called xbut (will be
renamed any day)... look into the source code of that.
	http://www.sandklef.com/xbut/



Best regards, Henrik


On Sun, 2002-05-19 at 16:35, Roland Seuhs wrote:
> Hi!
> 
> I really thought this is a FAQ, but after searching for hours on Google and 
> posting on various newsgroups, it doesn't seem to be.
> 
> All my mousebuttons are visible in xev, so X knows about them. However that's 
> pretty useless by itself as no app (except xev) I know uses more than 3 
> buttons (and the wheel).
> 
> Now I would like to use an additional mousebutton as an additional "Alt" key. 
> 
> That means if I press the mousebutton the system should behave the same way it 
> would if I would press the left "Alt" key.
> 
> The Linux/PPC crowd is often mapping F11 and F12 to work as mouse-buttons, it 
> should be possible to do it the other way around, too.
> 
> Does anybody know how to do it?
> 
> Thanks a lot,
> 
> Roland
> 
> -- 
> Oliver's Law:
>    Experience is something you don't get until just after you need it.
> 
> 
> _______________________________________________
> Xpert mailing list
> Xpert@XFree86.Org
> http://XFree86.Org/mailman/listinfo/xpert
> 
> 
-- 
Henrik Sandklef   http://www.sandklef.com/hesa/
----------------------------------------------------
Email             henrik@sandklef.com
Software          http://www.sandklef.com/software/

_______________________________________________
Xpert mailing list
Xpert@XFree86.Org
http://XFree86.Org/mailman/listinfo/xpert
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic