Evan: OK, I commited this patch of yours so command+key generates
also an FL_KEYUP event. Thanks.
> Index: Fl_cocoa.mm
> ===================================================================
> --- Fl_cocoa.mm (revision 7075)
> +++ Fl_cocoa.mm (working copy)
> @@ -1391,6 +1391,30 @@
> }
> @end
>
> +...@interface FLApplication : NSApplication
> +{
> +}
> +- (void)sendEvent:(NSEvent *)theEvent;
> +...@end
> +
> +...@implementation FLApplication
> +// The default sendEvent turns key downs into performKeyEquivalent when
> +// modifiers are down, but swallows the key up if the modifiers include
> +// command. This one makes all modifiers consistent by always sending key
> ups.
> +// FLView treats performKeyEquivalent to keyDown, but performKeyEquivalent is
> +// still needed for the system menu.
> +- (void)sendEvent:(NSEvent *)theEvent
> +{
> + NSEventType type = [theEvent type];
> + NSWindow *key = [self keyWindow];
> + if (key && type == NSKeyUp) {
> + [key sendEvent:theEvent];
> + } else {
> + [super sendEvent:theEvent];
> + }
> +}
> +...@end
> +
> static FLDelegate *mydelegate;
>
> void fl_open_display() {
> @@ -1398,7 +1422,7 @@
> if ( !beenHereDoneThat ) {
> beenHereDoneThat = 1;
>
> - [NSApplication sharedApplication];
> + [FLApplication sharedApplication];
> NSAutoreleasePool *localPool;
> localPool = [[NSAutoreleasePool alloc] init];
> mydelegate = [[FLDelegate alloc] init];
>
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev