I am using flagsChanged in NSView to trigger events when a modifier key is pressed or released. However, I do not quite understand how to get the actual new state of the key when this happens, short of checking the state of each modifier key manually. I am currently using my own state array to check it, but this seems wrong and is not reliable. How do I do this correctly?
Share
Just check the event that gets passed into
flagsChanged:against the various modifier key masks that you’re interested in: