toggle mouse buttons by script
Stephan Kahnt
stephan.kahnt at inubit.com
Fri Jul 21 21:07:37 BST 2006
Just to finish ths thread here is my new script:
<<< snip-here >>>
#!/bin/sh
# script for toggling mouse buttons and save the settings for kde
# what is the current setting, or better where to switch to ?
mouse_what_to_set() {
xmodmap -pp | cut -c 9,24 | grep -q 11 && echo "Left" || echo "Right"
}
# switch to Left or Right
switch_mouse() {
if [ "$1" == "Right" ]; then
list="1 2 3"
else
list="3 2 1"
fi
xmodmap -e "pointer = $list" && kwriteconfig --file kcminputrc --group Mouse --key MouseButtonMapping "${like}Handed"
}
# do the job
switch_mouse `mouse_what_to_set`
<<< snip-here >>>
Best regards
Stephan
___________________________________________________
This message is from the kde mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.
More information about the kde
mailing list