[xbindkeys] Advanced mouse binds?
I have a logitech mouse with some extra buttons on it. Previously I installed xbindkeys and set it up so that b:8 and b:9 (the shoulder buttons) on the mouse changed workspaces (well, emulated some keypresses).
Code:
"xdotool key --clearmodifiers ctrl+alt+Down" I want to have it set up so that b:8 acts as a modifer to my scrollwheel. So that if I scroll while holding down one of the shoulder buttons, it will change my workspace in the direction that I scroll. And I want to set it up so that when I hold the other shoulder button and use the scrollwheel it will activate the flip switcher. Now here's the clincher. xbindkeys doesnt appear to support multiple mouse keys to perform a single action. I tried to make my .xbindkeysrc contain the following: Code:
"xdotool key --clearmodifiers ctrl+alt+Down" Does anyone know how to do what i'm trying to do? |
I figured it out on my own. After hours of searching, I realized that the default .xbindkeysrc file syntax could not do sophisticated enough logic to handle multiple mouse keys, however it did mention that it supported the guile scripting language so after more searching I stumbled upon this guide:
http://computers-stuff.blogspot.ca/2...nf-file-i.html Using that guide I managed to make xbindkeys perform these functions:
The file is as follows ~/.xbindkeysrc.scm [OBSOLETE: See next post] Code:
;; This configuration is guile based. |
Improved the script.
- Modifier keys will no longer get stuck as they are forcefully released - Can properly handle events where the shoulder buttons are pressed by themselves (no scrollwheel used). .xbindkeysrc.scm Code:
;; This configuration is guile based. |
Interesting. I use a big Kensington trackball myself and I've been wanting to do something similar for a long time. I even posted something a few years ago about it (since I don't have guile experience) but got no answers (possibly because I screwed up the title for it. :doh:)
I'm going to be too busy this week to try it out right away, but I'm certainly going to look into it when I have the time. Thanks. |
All times are GMT -5. The time now is 05:04 PM. |