Skip navigation.
 
mlRe: Simulating menu bar blink in Cocoa
FROM : Benjamin Stiglitz
DATE : Sat Apr 19 23:42:22 2008

>>> If I understand well, your trying to catch event that match a menu 
>>> item shortcut minus the shift key. Isn't it possible to override -
>>> [NSApp sendEvent:] as you did, but instead of taking care of the 
>>> event yourself, create a new event that match the menu item and 
>>> then call super with this new event ?

>
> - (void)sendEvent:(NSEvent *)theEvent {
>     if ([theEvent isAnHotkeyEvent]) {
>         theEvent = [NSEvent eventWithTheKeystrokeAppKitWant];
>     }
>     [super sendEvent:theEvent];
> }
>
>
> I really don't know if it works, but it worth the try.


That’s a pretty common way to do it, and avoids the need to duplicate 
the actual method dispatch. Works great.

-Ben_______________________________________________

Cocoa-dev mailing list (<email_removed>)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>

This email sent to <email_removed>

Related mailsAuthorDate
mlSimulating menu bar blink in Cocoa John Stiles Apr 17, 19:54
mlRe: Simulating menu bar blink in Cocoa Randall Meadows Apr 17, 20:01
mlRe: Simulating menu bar blink in Cocoa John Stiles Apr 17, 20:05
mlRe: Simulating menu bar blink in Cocoa John Stiles Apr 17, 20:14
mlRe: Simulating menu bar blink in Cocoa Randall Meadows Apr 17, 20:16
mlRe: Simulating menu bar blink in Cocoa John Stiles Apr 18, 20:44
ml[SOLVED] Simulating menu bar blink in Cocoa John Stiles Apr 18, 23:25
mlRe: [SOLVED] Simulating menu bar blink in Cocoa Martin Wierschin Apr 19, 04:20
mlRe: [SOLVED] Simulating menu bar blink in Cocoa Martin Wierschin Apr 19, 04:22
mlRe: Simulating menu bar blink in Cocoa Benjamin Stiglitz Apr 19, 06:36
mlRe: Simulating menu bar blink in Cocoa Jean-Daniel Dupas Apr 19, 14:05
mlRe: Simulating menu bar blink in Cocoa Benjamin Stiglitz Apr 19, 23:42
mlRe: Simulating menu bar blink in Cocoa John Stiles Apr 20, 02:36
mlRe: [SOLVED] Simulating menu bar blink in Cocoa John Stiles Apr 20, 02:37