Remap the middle click action of Logitech T400 wireless mouse

I want to remap the functionality of the front part of middle click and back part of middle click on the Logitech Zone Touch Mouse T400 model.

According to the answer in this question, I tried the commands but I don't understand what to exactly swap.

Here is the output for the command xinput list-props id# (10 being the device id)

 nirmik@nirmik:~$ xinput list-props 10
Device 'Logitech Unifying Device. Wireless PID:4026':
    Device Enabled (134):   1
    Coordinate Transformation Matrix (136): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (256): 0
    Device Accel Constant Deceleration (257):   1.000000
    Device Accel Adaptive Deceleration (258):   1.000000
    Device Accel Velocity Scaling (259):    10.000000
    Device Product ID (251):    1133, 50475
    Device Node (252):  "/dev/input/event6"
    Evdev Axis Inversion (653): 0, 0
    Evdev Axes Swap (655):  0
    Axis Labels (656):  "Rel X" (144), "Rel Y" (145), "Rel Horiz Wheel" (650), "Rel Dial" (651), "Rel Vert Wheel" (652)
    Button Labels (657):    "Button Left" (137), "Button Middle" (138), "Button Right" (139), "Button Wheel Up" (140), "Button Wheel Down" (141), "Button Horiz Wheel Left" (142), "Button Horiz Wheel Right" (143), "Button Side" (645), "Button Extra" (646), "Button Forward" (647), "Button Back" (648), "Button Task" (649), "Button Unknown" (643), "Button Unknown" (643), "Button Unknown" (643), "Button Unknown" (643), "Button Unknown" (643), "Button Unknown" (643), "Button Unknown" (643), "Button Unknown" (643), "Button Unknown" (643), "Button Unknown" (643), "Button Unknown" (643), "Button Unknown" (643)
    Evdev Middle Button Emulation (658):    0
    Evdev Middle Button Timeout (659):  50
    Evdev Third Button Emulation (660): 0
    Evdev Third Button Emulation Timeout (661): 1000
    Evdev Third Button Emulation Button (662):  3
    Evdev Third Button Emulation Threshold (663):   20
    Evdev Wheel Emulation (664):    0
    Evdev Wheel Emulation Axes (665):   0, 0, 4, 5
    Evdev Wheel Emulation Inertia (666):    10
    Evdev Wheel Emulation Timeout (667):    200
    Evdev Wheel Emulation Button (668): 4
    Evdev Drag Lock Buttons (669):  0

And the output of the next command xinput get-button-map 10 is

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 

Now what do I exactly swap to change the middle click to front part of middle click = middle click action. From/instead of front part of middle click = super button


Try imwheel.

sudo apt-get install imwheel

You can configure your buttons using imwheel and it's recommended by the Ubuntu wiki.


I used this way:

  1. Install xbindkeys and xdotool

    sudo apt-get install xbindkeys xdotool
    
  2. Rebind the Super key to middle mouse button by xbindkeys config

    $ cat ~/.xbindkeysrc
    "xdotool click 2"
      c:133
    
  3. Add xbindkeys to start with X

    $ echo xbindkeys > ~/.xinitrc
    
  4. Disable opening Dash on Super key

    $ sudo apt-get install compizconfig-settings-manager
    

    Then press Alt + F2 and type about:config

    On tab "Launcher" you can disable or change "Key to show the Dash..."

  5. Start xbindkeys for this session or reboot.