I have implemented the - (void)flagsChanged:(NSEvent *)theEvent
method in my application. It works fine when I hold down the [alt] key. The method only sends when the key is pressed, but not when I let it go again. The - (void)keyUp:(NSEvent *)theEvent
won't be called. Is there anyway to see when the [alt] key is released?
Here is the code:
- (void)flagsChanged:(NSEvent *)theEvent
{
if([theEvent modifierFlags] & NSAlternateKeyMask)
{
NSLog(@"alt is down!!!");
}
}