Navigation Menu

Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed beeping introduced when we started passing key events through t…
Browse files Browse the repository at this point in the history
…he responder chain.
  • Loading branch information
slouken committed Sep 29, 2012
1 parent d869701 commit 64048de
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -224,6 +224,29 @@ - (void)windowDidResignKey:(NSNotification *)aNotification
}
}

// We'll respond to key events by doing nothing so we don't beep.
// We could handle key messages here, but we lose some in the NSApp dispatch,
// where they get converted to action messages, etc.
- (void)flagsChanged:(NSEvent *)theEvent
{
//Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent);
}
- (void)keyDown:(NSEvent *)theEvent
{
//Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent);
}
- (void)keyUp:(NSEvent *)theEvent
{
//Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent);
}

// We'll respond to selectors by doing nothing so we don't beep.
// The escape key gets converted to a "cancel" selector, etc.
- (void)doCommandBySelector:(SEL)aSelector
{
//NSLog(@"doCommandBySelector: %@\n", NSStringFromSelector(aSelector));
}

- (void)mouseDown:(NSEvent *)theEvent
{
int button;
Expand Down

0 comments on commit 64048de

Please sign in to comment.