71

In Windows, one can hit Shift+F10 to access the "Context Menu." But a similar keyboard action doesn't seem possible on Mac. One potential application...

When I make a spelling error in a document, Lion gives me the option to correct the error by right-clicking (or ctrl-clicking, two-finger tapping, etc) on the misspelled word and bringing up the context menu.

enter image description here

How can I open this menu from the keyboard? And is it possible to access the Context Menu from a Mac keyboard?

  • In Firefox, control-space opens the context menu -- but curiously, it doesn't include the spelling options when invoked this way! – Ken Sep 29 '12 at 23:19
  • I can't get it to open with ctrl-space, but things might have changed a lot since 2012 – jocull Jun 26 '18 at 19:02

15 Answers 15

35

@emmby

Whenever I see this question in the Internet or I ask it to someone .. people always misunderstand. Maybe because they are not Windows users, or they are Windows users who don't use the keyboard short-cuts.

I always have the same question but I didn't find the answer yet.

In windows, when we use the keyboard short-cuts we mostly use the Menu key in Windows keyboard(see this image):

The Menu Key in Windows keyboard <== this is the Menu key

When this Menu key is pressed, OS will assume that you right-clicked the highlighted/active element > then it will show you the context menu even if the mouse pointer is not pointing to the highlighted element.

So this feature seems to be missing in Mac OS. And whatever suggested solutions, even Enable Mouse Key it always require you to point/move your mouse pointer to element first, which is meaningless. If I need to use the keyboard short-cut to open the context menu on the highlighted item, why do I need again to move the mouse pointer to it also <== excuse me .. this is not a short-cut!!

26
+50

The context menu can primarily be opened by a right mouse click only. But in the Universal Acces settings in the System Preferences we can control mouse keys by using the keyboard number pad. When activated, a right mouse click then can be achieved by Ctrl+5 on a keyboard with a numpad or Fn+Ctrl+i on a laptop. This will allow you to 'right-click' your word.

Go to System Preference --> Universal Access --> Mouse --> Enable Mouse Keys (ON) Go to System Preference --> Universal Access --> Mouse --> Enable Mouse Keys (ON)

Found on: https://stackoverflow.com/a/11238186/1919382

  • 15
    While this does work, it opens the context menu at your mouse cursor and not your text cursor. – Uri Jan 21 '14 at 2:45
  • @Uri, what you say is correct. But when you type, the mouse cursor disappears and the menu opens at the text cursor. – CousinCocaine Jan 21 '14 at 8:04
  • 1
    Hmm, it doesn't seem to work for me. The mouse cursor just reappears at its last location. I've settle on just using the spell check shortcuts to solve this problem (cmd + :) – Uri Jan 21 '14 at 17:38
  • What about an external keyboard - that does not have the <fn> key? – javadba Aug 25 '16 at 17:47
  • Ctrl 5, as it says in my answer – CousinCocaine Aug 25 '16 at 20:31
3

Close to what you've asked, is to enable spelling auto-correction via:

and then stay with your cursor at the end of a mispelled word, so you'll get an iOS style correction-suggestion:

then with down-arrow and left/right-arrows you can choose the correct word.

  • strangely, i have that enabled, but can't get the iOS menu to pop up – emmby Dec 2 '11 at 0:00
  • @emmby It's not working for some apps, like Google Chrome.. – nuc Dec 2 '11 at 8:23
3

If you have "correct spelling automatically" checked and it doesn't seem to be working, it might be because you're trying it in an unsupported application. E.g., I can use the feature in TextEdit and Pages but not, e.g., FireFox or SublimeText 2 (two of my most used apps).

Tho I've spent way too much time looking, I haven't found any way of getting the suggested spellings from the context menu with the keys alone. The best option I've found so far is to use my thumb on the track pad to position the mouse and then hold ctl and tap (again with the thumb). It takes a bit longer because of the need for positioning, but at least I can keep my fingers on the home row.

I find it awkward to reach the ctl button, so I've used KeyRemap4MacBook (which is generally awesome and free) to customize the layout to make caps lock be ctl. KeyRemap will also let you assign ctl + click to button combinations, so you don't have to tap/click.

2

You can use Better Touch tool to set up any tap/swipe/click/key combination to the right click.

  • 3
    But it will just perform a secondary click at the current coordinates of the cursor, not show the context menu for a selection made with the keyboard. – Lri Dec 1 '11 at 22:29
  • You are right, there are options to call a url or script with the selected text, and I bet you can convince the developer to add this feature as well. – Ali Dec 2 '11 at 1:06
  • I have (and looooooove) Better Touch Tool, and the developer is a freakin' magician. But for this particular use case, I use Alfred, which is my only other indispensable Mac application, right after BTT. – Wildcard Sep 26 '16 at 11:10
2

Try press [fn]+[SHIFT]+[F10]

To me it seems that most windows on mac F-keys can be called this way.

Cheers!

  • 2
    this does not work for me – dwightk Apr 17 '14 at 17:28
  • not working for me either... – Tivoni May 23 '15 at 16:24
  • works on mac os x el capitan – David Hofmann Nov 25 '15 at 14:55
  • not working for me – RockyMM Jan 24 '16 at 18:21
  • What is this supposed to do? – javadba Aug 25 '16 at 17:29
2

ALMOST SOLVED

I got this solution to work in some Applications (like Finder, TextEdit, Firefox, ...) but not others (like Outlook, Chrome, ... )

A 'context click' can be mapped to a key/key-combo using all native Mac OS X features (thanks to its NeXT/OPENSTEP heritage). However, the solution is pretty technical "under the cover" stuff, and it may take some trial-and-error to get it to work.

Read about Key Bindings here, and follow (some) of the instructions to create your own ~/Library/KeyBindings/DefaultKeyBinding.dict file.

Key Bindings map keys (or key-combinations) to "Responders" inside the Text System. I found the Responder for rightMouseDown here, and found the "magic string" for my desired target key (F13) from this url: osxnotes.net/keybindings.html

My ~/Library/KeyBindings/DefaultKeyBinding.dict looks like this

{
    /* Context Menu */
    "^\Uf710" = "rightMouseDown:";  /* Ctrl-F13 */
    "^;" = "rightMouseDown:";       /* Ctrl-; */
}

Now I should be able to hit either Ctrl-F13 or Ctrl-; to get the context menu.

NOTE: You will have to quit & relaunch an Application to have it pick-up changes. (Worked for TextEdit in 10.10) Otherwise, log-out & log-back in.

  • Trying it out now. Even if it does not work this was interesting info. Will comment again on whether it works for me in Finder. – javadba Aug 25 '16 at 17:30
  • 1
    Unfortunately does not seem to work. Tried it in TextEdit on El Capitan. – javadba Aug 25 '16 at 17:33
2

I use Alfred with RightClick workflow.

I mapped Option+CMD+Enter to trigger a right click in the frontmost application.

RightClick used to work only in Finder but it was improved to work in most applications.

  • 1
    Or just use the File Actions feature, which is built into Alfred directly rather than requiring an extra workflow install. Either way you'll need to purchase the Powerpack. – Wildcard Sep 26 '16 at 11:12
  • 1
    @Wildcard. It's different than file action feature. RightClick is a global shortcut that triggers a rightclick in the current application through applescript. File action feature requires you to open the search bar, search for a file then choose a file action. – jrobichaud Sep 26 '16 at 12:01
  • Has some delay before menu appears, but it's the best solution I've found! Works also in Forklift. – Pavel Alexeev Nov 12 '17 at 14:55
1

I feel your pain.....Best work around I've found is on cnet. Haven't tried it yet but I plan to. Unlike a true contextual menu, this does require you look to the top-left for the commands you seek, but may still suffice to bring you the functionality you are looking for. http://www.cnet.com/news/access-menus-via-the-keyboard-in-os-x/

1

To bring up the spell check use cmd + :.

1

For spellchek(and more) I'm use popClip + alfred workflow Ppay

1

Cmd-shift-: Opens "Spelling & Grammar" on Chrome for me with El Capitan. It's a clunky bodge but I can now spell check.

1

For Word 365 on Mojave, 'Shift'+'F10' does the trick. If you have a Touch-bar on your MBP, you would need to press the 'fn' key to bring up the function keys.

0

Here is my solution on Github. This is a little AppleScript that I wrote making a control-click that you can assign to key of your choice using a shortcut utility app of your choice.

0

On my setup (external PC-style keyboard, Karabiner Elements, and single application I care about), I remapped a PC Menu key (Karabiner sees it as "application") to Keypad Numlock.

The application (CLion) has hotkey remapping ability and supports context menu for focused controls, so I mapped the key in the application.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .