[Debian][OM2008][FSO] Found an easy solution for universal right- and middle-click

Nikita V. Youshchenko yoush at debian.org
Tue Nov 25 16:54:57 CET 2008


> > > Here's an ugly hack to do what you suggest:
> > > bash -c 'xmodmap -e "pointer = 2 3 1"; /root/bin/waitclick.sh;
> > > xmodmap -e "pointer = 1 2 3"'
> > >
> > > where /root/bin/waitclick.sh:
> > > #!/bin/sh
> > > input-events 1 2>&1 | ( grep -q -m 1 released && kill $$ )
> > >
> > > I couldn't find a more elegant way but this one works for me.

Maybe a more elegant solution would be to write a small C program that 
will:
- put a tray icon,
- when icon is clicked, use XGrabPointer() to get the next click,
- once got, ungrab pointer and send sytnetic X events ButtonPress and 
ButtonRelease that simulate a right-click

This may be enhanced by showing a menu on a "long click" on the tray icon, 
and use that to simulate more events - middle-click, double-clicks, etc

Anybody wishes to write such a program? :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.openmoko.org/pipermail/community/attachments/20081125/e12667c6/attachment.pgp 


More information about the community mailing list