|
|
@@ -124,6 +124,11 @@ namespace env { namespace detail {
|
|
|
}
|
|
|
|
|
|
- (void)keyDown:(NSEvent *)theEvent {
|
|
|
+ if (!game) {
|
|
|
+ // This is a really ugly hack because, for dumb reasons, there are two
|
|
|
+ // GameView objects, one that I initialize, and one that I don't
|
|
|
+ return [(GameView*)[[self window] delegate] keyDown:theEvent];
|
|
|
+ }
|
|
|
if ([theEvent isARepeat])
|
|
|
return;
|
|
|
|
|
|
@@ -156,6 +161,11 @@ namespace env { namespace detail {
|
|
|
}
|
|
|
|
|
|
- (void)keyUp:(NSEvent *)theEvent {
|
|
|
+ if (!game) {
|
|
|
+ // This is a really ugly hack because, for dumb reasons, there are two
|
|
|
+ // GameView objects, one that I initialize, and one that I don't
|
|
|
+ return [(GameView*)[[self window] delegate] keyDown:theEvent];
|
|
|
+ }
|
|
|
NSLog(@"keyUp -> { 0x%04x, 0x%08lx }", [theEvent keyCode],
|
|
|
[theEvent modifierFlags]);
|
|
|
NSString *str = [theEvent charactersIgnoringModifiers];
|