45

Is it possible to invoke a context menu using a keyboard shortcut instead of clicking the right/alt mouse button in OS X? In particular, I would like a menu-key-like feature in OS X. I am wondering whether there is additional third-party software that provides such functionality.

Please note that the Mouse Keys feature is not an option as I don't want to depend on the position of the mouse cursor.

Similar Topics

  1. Keyboard Shortcut to Right Click in Mac OS X
  2. Right click using keyboard in Mac OS X
  3. Enable Right-Click on Mac OS X 10.7.5 by default
  4. Keyboard shortcut for spelling dropdown menu in OS X beyond Devonthink Pro?
  5. Add application to right click context menu on Mac OS X
Pup
  • 1,982
  • 2
  • 14
  • 18
czerwin
  • 799

8 Answers8

24

After doing extensive research on this topic, I can confirm that there is no built-in mechanism that enables context menu either by direct shortcut or right mouse click simulation. This is due to technical limitations of the operating system, which prevents from determining coordinates of the current selection (e.g., selected element).

Fortunately, in some applications it is possible to use Apple Script to facilitate such action, but this is a strictly application-specific approach.

czerwin
  • 799
6

It appears that every post I can find online is either wrong or merely outdated.

In Catalina, you can use System preferences -> Accessibility --> Pointer Control --> Alternate Control methods --> check Enable alternate control methods.

You can reassign the shortcut by clicking on the corresponding options button.

Update by another writer: here is that Dialog Box: this is brilliantly useful for me!

enter image description here

F12 brings up the context menu very close to the cursor (though not precisely as in Windows). This is great.

2

User vitor on the Alfred forums wrote this AppleScript which works in Finder on Catalina:

tell application "System Events" to set frontApp to name of first process whose frontmost is true

if (frontApp = "Finder") then tell application "System Events" tell application process "Finder" set _selection to value of attribute "AXFocusedUIElement" tell _selection to perform action "AXShowMenu" end tell end tell end if

You can save it as a service and set it to activate with a keyboard shortcut.

dazonic
  • 121
2

i have found a different solution with BetterTouch Tool. This app is available with Setapp.

If you have downloaded this app and given all permission. You can set up to "Show Context Menu for selected Item" when any trigger (my trigger is pressing "<") happens (screenshot):

BetterTouchTool

Hope it helps!

2

While the contextual activation is lacking, in OS X you can activate and access the top menu bar using the keyboard, which will give you access to all of the commands in the contextual menu, and more

http://www.cnet.com/news/access-menus-via-the-keyboard-in-os-x/

danny80
  • 29
1

Some applications such as Power BI on a browser will use the combination Shift + F10

kiewic
  • 1,070
1

Update for 2024: in macOS Sequoia there is now a shortcut of Control+Return.

However, it doesn’t work in all software so isn’t particularly helpful! In Word it does nothing, in Affinity software and in Chrome it seems to assume you just pressed Return without Control.

0

It is possible to achieve this with Karabiner-Elements. Let's say we want to open the context menu using the caps lock key:

  • Open Karabiner-Elements;
  • Under Simple Modifications > For All Devices, click Add item;
  • On the left dropdown list select Modfifier keys > caps_lock;
  • On the right dropdown list select Mouse buttons > button2.

Note: for this modification to work, macOS System Settings > Mouse > Secondary click needs to be set to Click Right Side. Otherwise, if Click Left Side is defined, use Mouse buttons > button1 instead (source: https://github.com/pqrs-org/Karabiner-Elements/issues/2376).

The macOS limitation mentioned by @czerwin still applies, i.e this will open the context menu of the item where the mouse pointer is located.