On Tue, Jul 23, 2013 at 11:13:47AM +0100, Chris Walker wrote:
I have already tried to map the buttons to other functions but that hasn't worked so I need to do some more work on that and although I might be able to resolve those issues, there's one I can't. That one thing is a double click. In Windows I have button 2 (3 in linux!) configured to act as a double click but I can't seem to do that here.
To get a double-click from a single click I use xbindkeys and xte which (in Ubuntu) is part of xautomation. In my .xbindkeysrc file I have:-
"/usr/bin/xte 'mouseup 8' 'mouseclick 1' 'mouseclick 1' &" b:8 + Release "/usr/bin/xte 'mouseup 9' 'mouseclick 1' 'mouseclick 1' 'mouseclick 1' &" b:9 + Release
This gives me a double click of button 1 for button 8 and a triple click for button 9. I have a Logitech scrollball with two extra buttons which appear as buttons 8 and 9 for some reason.
For changing key bindings (including mouse buttons) I use xmodmap which uses .Xmodmap at login. My .Xmodmap is:-
! pointer = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 ! ! ! Set Right 'Windows' key to be the multi key for accented characters etc. ! keycode 134 = Multi_key ! ! ! Set Alt Gr key to be Mode_Switch which is an extra shift key ! ! keycode 108 = Mode_switch Mode_switch ! ! ! Set so that Mode_Switch plus > give a ▶ key ! ! keysym period = period rightcaret U25B6 NoSymbol ! ! ! Prevent shifted space giving nobreakspace, but leave with CTRL/SHIFT/Space ! keycode 65 = space space space nobreakspace ! ! ! Switch off CapsLock ! keycode 66 =
As you can see the mouse button mapping is commented out as I don't need it with my current mouse (as shown it does nothing anyway).