2

I'm looking for a way to map a mouse button to simulate the right click (contextual menu) in Ubuntu 13.10. In windows I can achieve this with AutoHotKey in an easy way, just by adding this line

(XButton2::LButton)

to the script file.

By executing xev in the terminal, I know that the physical button of my mouse is detected with id=11. I wonder if there is a way in Ubuntu to map button:id=11 to button:id=3, or something like that.

pomsky
  • 68,507
nowxue
  • 153
  • 1
  • 5

1 Answers1

1

Following the instructions in this answer, find the buttons that should be switched. If 11 and 3 need to be switched, you switch them in the sequence like this:

xinput set-button-map id# 1 2 11 4 5 6 7 8 9 10 3 12

If this works, you need to make it run automatically. As explained in this question, you can add the command to the end of ~/.profile (in your home directory) to make it run when you log in.

Eliah Kagan
  • 117,780
Nattgew
  • 2,100