Mouse center click not working in Mint

Mouse scroll button click is very useful for pasting the copied content in a singe step. But in some OS distributions is disabled by default.

This tutorial explains the steps to enable the mouse scroll button click.

Step1: Find out the mouse device id.

#xinput list

⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
⎜   ↳ Lenovo 300 Wireless Compact Mouse Lenovo 300 Wireless Compact Mouse    id=9    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                  id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard                 id=5    [slave  keyboard (3)]
    ↳ Power Button                                id=6    [slave  keyboard (3)]
    ↳ Video Bus                                   id=7    [slave  keyboard (3)]
    ↳ Video Bus                                   id=8    [slave  keyboard (3)]
    ↳ HP TrueVision HD Camera: HP Tru             id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard                id=11   [slave  keyboard (3)]
    ↳ HP Wireless hotkeys                         id=13   [slave  keyboard (3)]
    ↳ HP WMI hotkeys                              id=14   [slave  keyboard (3)]
    ↳ Lenovo 300 Wireless Compact Mouse Lenovo 300 Wireless Compact Mouse    id=15   [slave  keyboard (3)]

Here the id is 9 and note this.

Step2: Check the device properties for this mouse.

#xinput list-props 9

Device 'Lenovo 300 Wireless Compact Mouse Lenovo 300 Wireless Compact Mouse':
    Device Enabled (145):    1
    Coordinate Transformation Matrix (147):    1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Natural Scrolling Enabled (280):    0
    libinput Natural Scrolling Enabled Default (281):    0
    libinput Scroll Methods Available (282):    0, 0, 1
    libinput Scroll Method Enabled (283):    0, 0, 0
    libinput Scroll Method Enabled Default (284):    0, 0, 0
    libinput Button Scrolling Button (285):    2
    libinput Button Scrolling Button Default (286):    2
    libinput Middle Emulation Enabled (287):    0
    libinput Middle Emulation Enabled Default (288):    0
    libinput Accel Speed (289):    0.000000
    libinput Accel Speed Default (290):    0.000000
    libinput Accel Profiles Available (291):    1, 1
    libinput Accel Profile Enabled (292):    1, 0
    libinput Accel Profile Enabled Default (293):    1, 0
    libinput Left Handed Enabled (294):    0
    libinput Left Handed Enabled Default (295):    0
    libinput Send Events Modes Available (265):    1, 0
    libinput Send Events Mode Enabled (266):    0, 0
    libinput Send Events Mode Enabled Default (267):    0, 0
    Device Node (268):    "/dev/input/event3"
    Device Product ID (269):    6127, 24715
    libinput Drag Lock Buttons (296):    <no items>
    libinput Horizontal Scroll Enabled (297):    1

Note that the value of "libinput Middle Emulation Enabled" is 0 which means its disabled state.

Step3: Enable the mouse scroll button click using the following command.

#xinput set-prop 9 "libinput Middle Emulation Enabled" 1

Note that the device id might be changed according to the system and use the correct id in commands.

That's all…

Leave a Reply

Your email address will not be published. Required fields are marked *