34

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,722
  • 2
  • 13
  • 17
czerwin
  • 649
  • 1
  • 5
  • 9
  • 3
    For Finder (at least), a user has made [a workflow for Alfred](http://www.alfredforum.com/topic/3147-rightclick-%E2%80%94-do-a-right-click-on-finder-files-with-the-keyboard/) to do it successfully without requiring the mouse to hover over the current selected file/folder! I've tested it in Mavericks 10.9.4 and it works even on the Desktop, despite what people say on that Alfred thread. (that may be because I have XtraFinder installed, or because Apple fixed the bug in one of the recent Mavericks revisions) :). So just open the .alfredworkflow file, assign a hotkey to it, and away you go! –  Jul 19 '14 at 02:02

5 Answers5

20

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
  • 649
  • 1
  • 5
  • 9
5

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.

WestCoastProjects
  • 3,465
  • 11
  • 51
  • 90
OrthogoNull
  • 75
  • 1
  • 1
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
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
  • 10
    Which doesn't help when the context menu is provided by an app inside another app, e.g. websites with custom context menus :/ – Pat May 13 '16 at 18:56
1

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

kiewic
  • 1,060
  • 6
  • 16
  • 26
  • `Shift-F10` is a typical Windows way to do this, and it seems on MacOS this works only in Microsoft apps. – jakub.g Jan 26 '22 at 21:13