Skip to content

Instantly share code, notes, and snippets.

@stevestreza
Created May 27, 2009 18:58
Show Gist options
  • Select an option

  • Save stevestreza/118829 to your computer and use it in GitHub Desktop.

Select an option

Save stevestreza/118829 to your computer and use it in GitHub Desktop.
- (void)sendEvent:(NSEvent *)anEvent{
//This works around an AppKit bug, where key up events while holding
//down the command key don't get sent to the key window.
if([anEvent type] == NSKeyUp && ([anEvent modifierFlags] & NSCommandKeyMask)){
[[self keyWindow] sendEvent:anEvent];
}else{
[super sendEvent:anEvent];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment