If you find this post, chances are you want to change this mouse's behavior.
This mouse is a mess. Try to avoid it if you can. This mouse was designed for
Windows 8.
Button 2 (which is usually the scroll's wheel button) is not present. Instead
the scroll makes a clicking sound, and the mouse goes from "free-spinning
mode" to "click-to-click" mode in some sort of mechanical way. I really
needed that button 2 in my mouse, so I spend some time finding if there could
be a way to make a square button under the scroll's wheel behave as button 2.
Unfortunately I were unable to find any satisfactory solution to use this
button, at lest not on one click :(
Let me show you how this mouse behaves, this was took from the following bug
report trying to find a way to make this mouse usable:
https://bugzilla.redhat.com/show_bug.cgi?id=1035668
Default button mapping, as reported by xev and xinput:
Button 1 -> left click
Button 3 -> right click
Button 4 -> wheel up
Button 5 -> wheel down
Button 8 -> tilt left
Button 9 -> tilt right
And the problematic ones:
Pressing the forward button sends Super_R (keycode 134).
Pressing the back button sends simultaneously Super_L and d (keycodes 133 &
40).
Pressing the square button once, gives simultaneously Alt_L, Super_L and
XF86TouchpadOff (keycodes 64, 133, 201).
Pressing it a second time is like pressing button 1.
This button alternates between those two states.
Moving the mouse to the left while pressing the square button gives
simultaneously Control + Tab + Super_L, and button 1 when the square button
is release.
Some times, after pressing the square button and releasing, and later you
move the mouse to the left, it will still sent a Control + Tab + Super_L, so
is not very consistent :(
I found the following page which really helped me a lot:
https://help.ubuntu.com/community/MouseCustomizations
Since The first thing I wanted to do is be able to use some other button as
button 2 I used the following command to switch button 9 (tilt right) to be
button 2:
xmodmap -e "pointer = 1 9 3 4 5 6 7 8 2 10 11 12 13 14 15 16 17 18 19 20 21
22 23 24"
Now to change the behavior of the other buttons I used xbindkeys. xbindkeys
will catch for instance Super_L and d (back button), and with the help xte we
can sent a different key press:
This is my .xbindkey:
#forward
"/usr/bin/xte 'keyup Super_R' ; sleep .01; /usr/bin/xte 'key Home' &"
Super_R
#back
"/usr/bin/xte 'keyup Super_L' ; sleep .01; /usr/bin/xte 'key End' &"
Mod4 + d
#move mouse left with square button pressed
""
Control + Tab + Super_L
#square button stage 1
"/usr/bin/xte 'mouseclick 1'&"
Super_L + Alt
I was unable to catch Super_R + Release. Maybe I just didn't know how to.
Notice that I couldn't find a use for "move mouse left with square button
pressed", so I just left it blank, and first stage of the square button will
do the same thing as the second stage (a single button 1 click).
I usually use button 2 of the mouse to open links in a new top on the
browser. In my effort to make the square button work as a button 2, I came
with the following code which will prevent the second or the last release of
the square button from clicking were it shouldn't:
#!/bin/bash
/usr/bin/xte 'mouseclick 2'
xmodmap -e "pointer = 24 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
22 23 1"
sleep 1
xmodmap -e "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"
This was suppose to prevent the mouse from clicking, after "move mouse left
with square button pressed", or in the second click switching back to stage
one of the squire button.
It worked, but having to move the mouse left every time or double clicking to
go back to stage 1 before one second was insane.
I know I spent to much time in this shitty mouse, maybe buying a new one was
the best option but I couldn't return it back to the store and I didn't want
it to go to waste.
So there you have it. Hopefully it will help some one else. Thank you.
P.S. is some body nows a way to change second stage of the square button will
be awesome. See you every one.