I found some example code when building a menu bar item in OS X. It makes use of the single | and I'm unsure what it actually means.
(What I'm trying to do is have a function called on left click of the menu item, but have it show the menu on right click)
Here's my code
//Get reference to main system status bar
let statusItem = NSStatusBar.systemStatusBar().statusItemWithLength(-1)
statusItem.image = icon
statusItem.menu = menuBar
if let statusButton = statusItem.button
{
statusButton.target = self
statusButton.action = #selector(statusItemClicked)
statusButton.sendActionOn(Int(NSEventMask.RightMouseUpMask.rawValue | NSEventMask.LeftMouseUpMask.rawValue))
}
Original Answer with code Left vs Right Click Status Bar Item Mac Swift 2