View Single Post
Posts: 51 | Thanked: 2 times | Joined on Jan 2008
#22
Originally Posted by albright View Post
machster, apologies if this is too simple minded, but
did you make your script executable (chmod a+x swmb.sh)?
No apologies necessary. Thanks for the suggestion. I had not made it executable. However, after I did, now when I hit the menu shortcut key Kwrite no longer pops up. But now nothing seems to happen. Even saved the file with Kwrite.

Let me see if I understand the usage here. When I hit the specified shortcut key the mouse is supposed to emulate the right click? So if I were to then tap on the screen it would be a right click? Then if I hit shortcut again and click the screen I am back to the left click?

Just confirm, is this the script:

export CHANGE=`/usr/bin/xmodmap -pp | awk '{print $2}' | tail -n 33 | head -n 1`
if test 3 = $CHANGE
then
/usr/bin/xmodmap -e "pointer = 1 2 3"
else
/usr/bin/xmodmap -e "pointer = 3 2 1"
fi