Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to add an item to the right-click context menu of a Mac OS programmatically?

I have a program that works with a variety of files on both the Windows and Mac OS.

I would like to give the user the option of adding a new option to their right click/control click context menu to the effect of "Compress with [Name of App]".

I know this is quite possible in Windows with modifications to the registry, but is there a way to achieve this for the Mac? Perhaps using C++ or objective C?

like image 262
joshcomley Avatar asked May 21 '09 19:05

joshcomley


People also ask

How do I add to right-click menu on Mac?

Control-click on a Mac is similar to right-click on a Windows computer—it's how you open shortcut (or contextual) menus on a Mac. Control-click: Press and hold the Control key while you click an item.

How do you customize the context menu on a Mac?

The context menu appears when you Control+click, right+click, or two-finger click something on a Mac. Most of the items in a context menu appear depending on what was clicked and which app you are using.

How do you bring up contextual menu?

Right-click (or select and hold) on a file or folder to open the context menu.


2 Answers

Yes, you can. You need to make a contextual menu plugin. Apple has contextual menu plugin sample code on its developer site.

like image 181
Chuck Avatar answered Sep 27 '22 21:09

Chuck


Here's a guide: Writing Contextual Menu Plugins for OS X, part 1

like image 28
pix0r Avatar answered Sep 27 '22 23:09

pix0r