how to detect left or right click on statusbar icon, and than make some action, depending on which mouse button (trackpad) was clicked?
I use:
_statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] retain];
[_statusItem setMenu:menu];
[_statusItem setHighlightMode:YES];
To generate statusBar icon