src/video/cocoa/SDL_cocoaevents.m
changeset 6461 6d17371235d3
parent 6138 4c64952a58fb
child 6515 f750d9ecae1e
equal deleted inserted replaced
6459:df49d3db1cb9 6461:6d17371235d3
   204         case NSRightMouseDragged:
   204         case NSRightMouseDragged:
   205         case NSOtherMouseDragged: /* usually middle mouse dragged */
   205         case NSOtherMouseDragged: /* usually middle mouse dragged */
   206         case NSMouseMoved:
   206         case NSMouseMoved:
   207         case NSScrollWheel:
   207         case NSScrollWheel:
   208             Cocoa_HandleMouseEvent(_this, event);
   208             Cocoa_HandleMouseEvent(_this, event);
   209             /* Pass through to NSApp to make sure everything stays in sync */
       
   210             [NSApp sendEvent:event];
       
   211             break;
   209             break;
   212         case NSKeyDown:
   210         case NSKeyDown:
   213         case NSKeyUp:
   211         case NSKeyUp:
   214         case NSFlagsChanged:
   212         case NSFlagsChanged:
   215             Cocoa_HandleKeyEvent(_this, event);
   213             Cocoa_HandleKeyEvent(_this, event);
   216             /* Fall through to pass event to NSApp; er, nevermind... */
       
   217 
       
   218             /* Add to support system-wide keyboard shortcuts like CMD+Space */
       
   219             if (([event modifierFlags] & NSCommandKeyMask) || [event type] == NSFlagsChanged)
       
   220                [NSApp sendEvent: event];
       
   221             break;
   214             break;
   222         default:
   215         default:
   223             [NSApp sendEvent:event];
   216             break;
   224             break;
   217         }
   225         }
   218         /* Pass through to NSApp to make sure everything stays in sync */
       
   219         [NSApp sendEvent:event];
   226     }
   220     }
   227     [pool release];
   221     [pool release];
   228 }
   222 }
   229 
   223 
   230 #endif /* SDL_VIDEO_DRIVER_COCOA */
   224 #endif /* SDL_VIDEO_DRIVER_COCOA */