1

My problem is that I don't know keyname action for Mouse Click.
For example I want to remap F1 which keycode is 67 with a mouse click 1

I have to type:

xmodmap -e "keycode 67 = ??"          

What I need to put in place of question marks (for mouse click)?

αғsнιη
  • 35,660
roofik5
  • 11

1 Answers1

1

I don't think that it's possible using only xmodmap tool to accomplish what you wish. This because the mouse button is not a key, so it can't have a keyname.

One way to do what you wish is to use xdotool Install xdotool. Using the following command line you can simulate a left click of your mouse:

xdotool click 1

Now, all you have to do is to add a custom keyboard shortcut for the above command. You can't use the F1 key for a custom shortcut, but you can use for example F2 key, then use xmodmap to make F1 key to act as F2 key:

xmodmap -e "keycode 67 = F2"
Radu Rădeanu
  • 169,590