How to remap a mouse button on HP 820 laptop to create a middle button

My laptop has two sets of mouse buttons, one above and one below the touchpad. In Windows I've remapped the upper one to at as a middle button, and I'd like a way to do this in Ubuntu.

I installed xev, but whichever button I press I get the same output:

state 0x10, button 3, same_screen YES
state 0x410, button 3, same_screen YES

... so it seems that Ubuntu can't tell the difference between the two buttons? I'm not sure how I should proceed with this now, does anyone have any suggestions?

1 Answer

Building on this answer:

Use xinput to view the list of input devices and try to identify your laptop's builtin "mouse" device. With that ID, use xinput test with that device ID, and press each of the mouse buttons, watching the button ID that comes up for each one. If the all of the buttons have unique IDs, then you can reassign each one independently with xinput set-button-map. However, if the buttons on the top and bottom resolve to the same button ID, then you won't be able to map them independently.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like