MacOS – How to make right click using keyboard only on a Mac

contextual menukeyboardmacosshortcut

Is there way to set a keyboard shortcut or key to simulate a mouse right click but without touching trackpad or mouse?

E.g. Imagine you have a list of files in Finder. You move your selection by going up and down with keyboard arrows. When you are happy with selection, you "press a button" and it simulates as if you did a secondary click on the file you selected earlier with the keyboard. The context menu should not open where the mouse pointer is, otherwise I'd have to move it over selection first, which ruins the keyboard-only workflow.

On Mac currently, all current right click options need me to touch trackpad or mouse:

  • Two finger single tap

  • CTRL+click

  • Tap in right area of trackpad if enabled in Trackpad Settings.

Similar to following windows option key.

enter image description here

Best Answer

I don't know any way to show a context menu for items selected with the keyboard like what the menu key does in Windows.

To assign a keyboard shortcut for performing a secondary click at the current coordinates of the pointer, you can either:

  • Use a private.xml like this with Karabiner:

    <?xml version="1.0"?>
    <root>
      <item>
        <name>Right Mousebutton</name>
        <identifier>rightMouseButton</identifier>
        <autogen>__KeyToKey__ KeyCode::OPTION_R, PointingButton::RIGHT</autogen>
      </item>
    </root>
    
  • Use BetterTouchTool:

  • Use Keyboard Maestro:

  • Download MouseTools and assign a shortcut to MouseTools -rightClick.