2008-12-16 21:31:41 +00:00
|
|
|
/* All Rights reserved */
|
|
|
|
|
|
|
|
#include <AppKit/AppKit.h>
|
|
|
|
#include "PCDebuggerView.h"
|
|
|
|
|
|
|
|
@implementation PCDebuggerView
|
2008-12-22 00:38:35 +00:00
|
|
|
|
|
|
|
/** set the controlling debugger instance */
|
|
|
|
-(void)setDebugger:(PCDebugger *)theDebugger
|
|
|
|
{
|
|
|
|
debugger = theDebugger;
|
|
|
|
}
|
|
|
|
|
2008-12-22 00:39:45 +00:00
|
|
|
/** respond to key events and pipe them down to the debugger */
|
2008-12-22 00:38:35 +00:00
|
|
|
-(BOOL)performKeyEquivalent: (NSEvent*)theEvent
|
|
|
|
{
|
|
|
|
NSString *chars;
|
|
|
|
|
|
|
|
chars = [theEvent characters];
|
|
|
|
if ([chars length] == 1)
|
|
|
|
{
|
|
|
|
unichar c;
|
|
|
|
c = [chars characterAtIndex: 0];
|
|
|
|
|
|
|
|
NSLog(@"character: %c", c);
|
|
|
|
[debugger putChar:c];
|
|
|
|
}
|
|
|
|
return [super performKeyEquivalent:theEvent];
|
|
|
|
}
|
|
|
|
|
2008-12-16 21:31:41 +00:00
|
|
|
@end
|