Unwanted beep when a key is hit
Got it. The beep occurs at keyDown
, not at KeyUp
. To remove the beep, I need to handle it, and an empty implementation will suffice. The key is not to pass it to super
- (void)keyDown:(NSEvent *)theEvent {
}
- (void)keyUp:(NSEvent *)theEvent {
switch (theEvent.keyCode) {
case KeyCodeEnumBackspace:
case KeyCodeEnumDelete:
if (self.scheduleControl.selectedEvent) {
[self.scheduleControl deleteEvent:self.scheduleControl.selectedEvent];
}
break;
default:
break;
}
}