title: Command-Key-Up Cocoa
body: <p>I'm trying to mimic the functionality of the cmd-tab keyboard shortcut where the user can switch between applications hitting a certain key and then when they release command something happens. </p>
  
  <p>I'm using this code right now but it can only detects keydown. I need this to fire on key up </p>
  
  <pre><code>- (void)flagsChanged:(NSEvent *)theEvent {
  
  if ([theEvent modifierFlags] &amp; NSCommandKeyMask) {
      NSLog(@"Do my stuff here");
  }
  }
  </code></pre>
  
  <p>Thanks</p>