How to check if Option key is down when user clicks a NSButton
check [NSEvent modifierFlags]...
if ([NSEvent modifierFlags ] & NSAlternateKeyMask)
{
//do something
}
Just my 2c, a Swift 3 version:
if NSEvent.modifierFlags().contains(NSEventModifierFlags.command) {
print("Bingo")
}
One can see the rest of the flags in the documentation for NSEventModifierFlags
.