# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1303116993 0 # Node ID bf2ca780f62d922ecb322e031acaf6677ee96f39 # Parent 2b07bf8ed95b4232c206261ef4034b8fdbff49fb One more try at window key handling... since I can't seem to trap keyDown events in most places that get focus... Trap it in the sendEvent method.. this will get all keystrokes destined for this window. diff -r 2b07bf8ed95b -r bf2ca780f62d mac/dw.m --- a/mac/dw.m Mon Apr 18 06:12:59 2011 +0000 +++ b/mac/dw.m Mon Apr 18 08:56:33 2011 +0000 @@ -576,11 +576,13 @@ @end @interface DWWindow : NSWindow +-(void)sendEvent:(NSEvent *)theEvent; -(void)keyDown:(NSEvent *)theEvent; @end @implementation DWWindow --(void)keyDown:(NSEvent *)theEvent { _event_handler(self, theEvent, 2); } +-(void)sendEvent:(NSEvent *)theEvent { if([theEvent type] == NSKeyDown) { _event_handler(self, theEvent, 2); } [super sendEvent:theEvent]; } +-(void)keyDown:(NSEvent *)theEvent { } @end /* Subclass for a top-level window */