-- (void)keyDown:(NSEvent *)theEvent {
- if (!theEvent.isARepeat) {
- if ((theEvent.modifierFlags & NSAlternateKeyMask)
- && theEvent.keyCode == 0x33) {
- // Allow Alt+Backspace to clear the field.
+- (void)keyDown:(NSEvent *)event {
+ static const NSUInteger IGNORE = NSAlternateKeyMask | NSCommandKeyMask;
+ if (!event.isARepeat) {
+ if ((event.modifierFlags & IGNORE) && event.keyCode == 0x33) {
+ // Allow Alt/Command+Backspace to clear the field.