Fixed beeping introduced when we started passing key events through the responder chain.
authorSam Lantinga
Sat, 29 Sep 2012 02:50:42 -0700
changeset 6514e94c2eaaa1ab
parent 6513 c781fb99ce39
child 6515 f750d9ecae1e
Fixed beeping introduced when we started passing key events through the responder chain.
src/video/cocoa/SDL_cocoawindow.m
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Sat Sep 29 01:12:40 2012 -0700
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Sat Sep 29 02:50:42 2012 -0700
     1.3 @@ -224,6 +224,29 @@
     1.4      }
     1.5  }
     1.6  
     1.7 +// We'll respond to key events by doing nothing so we don't beep.
     1.8 +// We could handle key messages here, but we lose some in the NSApp dispatch,
     1.9 +// where they get converted to action messages, etc.
    1.10 +- (void)flagsChanged:(NSEvent *)theEvent
    1.11 +{
    1.12 +    //Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent);
    1.13 +}
    1.14 +- (void)keyDown:(NSEvent *)theEvent
    1.15 +{
    1.16 +    //Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent);
    1.17 +}
    1.18 +- (void)keyUp:(NSEvent *)theEvent
    1.19 +{
    1.20 +    //Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent);
    1.21 +}
    1.22 +
    1.23 +// We'll respond to selectors by doing nothing so we don't beep.
    1.24 +// The escape key gets converted to a "cancel" selector, etc.
    1.25 +- (void)doCommandBySelector:(SEL)aSelector
    1.26 +{
    1.27 +    //NSLog(@"doCommandBySelector: %@\n", NSStringFromSelector(aSelector));
    1.28 +}
    1.29 +
    1.30  - (void)mouseDown:(NSEvent *)theEvent
    1.31  {
    1.32      int button;