Xorg and three button mouse: emulate more than scroll alone
- by drumfire
I'm happy with my three-button mouse. But it could have more functions.
When I press the middle button (button 2) and move the mouse, I can scroll up/down and left/right. xev shows me that when I drag the mouse with button 2 pressed it actually emulates button 4 (scroll up), 5 (down), 6 (left) and 7 (right).
But can we take this further? For example, I would like to emulate button 8 if I press button 1 and 2 together, and button 9 if i press button 2 and 3. This would allow me to have the 'back' and 'forward' functionality in my browser.
It would also be nice to get more functionality by pressing, for example, shift+mouse1, alt+mouse2. You could have a whole new set of emulated keys. Can this be done and if yes, then how?