xdotool click --clearmodifiers 3
works as right-click in firefox
and chromium-browser
, but not in all programs such as Thunar file manager and xfce4-terminal. Why is that?
In terminal, if I run the command by entering it there, context menu appears, but if I run the command by keyboard shortcut (set in Xfce's keyboard settings), it does not work.
Anyway, shift + F10 seems to work (though I have to use Fn key in my Macbook keyboard).
xdotool simulates you moving or clicking the mouse, or pressing the keyboard. You trigger the xdotool script with the keyboard, but before you are releasing the key, xdotool already issues the mouse click. For some situations, xdotool may be too fast. The precise reason why it sometimes works, the other time not, is probably only to be found out by experts.
Anyway, try introducing a few ms delay by prepending the xdotool command with a
sleep
command, e.g.would introduce a 200 ms delay before executing the xdotool command.