Keyboard shortcut equivalent to right-clicking

I am looking for a keyboard shortcut to raise a context menu using Ubuntu on a MacBook pro. Pressing the keyboard shortcut should have the same effect as right-clicking at the cursor location.

On Windows keyboards, there is a dedicated button for this near the space bar. I have also read about using Shift+F10 or Ctrl+Space, but these have no effect on my system.


Shift+F10 worked in my case. I guess the need of Fn depends on the keyboard you are using.

P.S. I used this combination on a file in Nautilus (Ubuntu 14.04 LTS).


The keysym to trigger the context menu is called Menu. It can be bound to an arbitrary keycode like this:

$ xmodmap -e 'keycode 68 = Menu'

Can be manually triggered from the command line like:

$ xdotool key Menu

And to find out the keycode it is currently bound to one can do:

$ xmodmap -pke | grep Menu

To figure out what keycode a key emits one can use:

$ xev

Try Shift+Fn+F10. This works on Windows and Ubuntu in VirtualBox on OS X for me.


I generally use the basic: Ctrl+F10


Make sure you have a package named xdotool installed.

Make this application shortcut for the key of your preference:

xdotool click 3

Unfortunately this does not work on some applications, but seems to work on chromium-browser and firefox.

Bonus: For middle click the command is

xdotool click 2

Making application shortcuts for keyboard may vary according to the desktop environment used. In Xfce (used in e.g. Xubuntu) making such shortcuts happens easily in Keyboard dialog.