Ask questionsHow to prevent popup opening when holding option key?

Is there a possibility to prevent popup opening if the menu bar icon was clicked while holding option key? I have found the way how to detect if the option key was used but I cannot prevent popup from being opened.

popupController.willOpenPopup = {
    keys in debugPrint("Will open popup!")
    if (keys == .option) {
        self.popupController.close() // doesn't work

Answer questions inket

I'll have to add a new callback where you can return a bool to decide whether you want it to open or not


Related questions

No questions were found.
Github User Rank List