1

With xmodmap I can map F2 to work as left click:

xmodmap -e "keycode 68 = Pointer_Button1"

However, when I use shift+F2 to simulate shift left-click to select files on nautilus for example, it doesn't work.

  • Didn't test this one, but a common issue (also occurring with xdotool equivalents) is that you are virtually pressing the shortcut PLUS the targeted key or mousebutton. Many times fixed when you add a break of let's say 0.5 between pressing and the actual targeted (virtual) action. – Jacob Vlijm Aug 30 '18 at 21:23
  • I have no idea how to test it on xmodmap @JacobVlijm . I'm trying to find how to map a key to reproduce a key combination. – Vitor Abella Aug 31 '18 at 2:01
  • @JacobVlijm I know that this feature is possible because when I use universal access to use keypad to control the mouse, "5" simulates left-click on all its aspects – Vitor Abella Aug 31 '18 at 2:12
  • I am afraid you are misunderstanding, if you call a ke by (another) key, you are actually virtually pressing both the real one and the one you call. It depends on if the combination isn't disabling the latter. Very well possible it worked with 5. – Jacob Vlijm Aug 31 '18 at 5:35
  • @JacobVlijm I already solved the problem as you can see in my answer. When I said it was possible to do, I meant that if someone made 5 to work as left-click, I can make F2. – Vitor Abella Aug 31 '18 at 5:42
0

As nothing is defined for its modifier, when shift+F2 is pressed, nothing happens.

So:

xmodmap -e "keycode 68 = Pointer_Button1 Pointer_Button1"

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.