I would like to be able to use the tableview in my NSWindowController using only keys. The up and down keys already work so all I need is the enter key for selecting. I do this using the keyUp method in my NSWindowController:
- (void)keyUp:(NSEvent *)the Event {
if (theEvent.keyCode == 36) // Enter key
// Do stuff
}
It works fine, the only problem is that whenever I press enter the computer plays a system sound. Does anyone know how I could mute the sound, or maybe another way to do this?
You have to call
[super keyUp:theEvent];as default