mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Turn events back on!
This commit is contained in:
@@ -63,23 +63,23 @@
|
||||
}
|
||||
|
||||
// Overridden
|
||||
//- (void)sendEvent:(NSEvent *)event {
|
||||
// if ([event type] == NSKeyDown) {
|
||||
// BOOL handeled = NO;
|
||||
// AtomController *controller = [[self keyWindow] windowController];
|
||||
//
|
||||
// // The keyWindow could be a Cocoa Dialog or something, ignore that.
|
||||
// if ([controller isKindOfClass:[AtomController class]]) {
|
||||
// JSValueRef value = [controller.jscocoa callJSFunctionNamed:@"handleKeyEvent" withArguments:event, nil];
|
||||
// handeled = [controller.jscocoa toBool:value];
|
||||
// }
|
||||
//
|
||||
// if (!handeled) [super sendEvent:event];
|
||||
// }
|
||||
// else {
|
||||
// [super sendEvent:event];
|
||||
// }
|
||||
//}
|
||||
- (void)sendEvent:(NSEvent *)event {
|
||||
if ([event type] == NSKeyDown) {
|
||||
BOOL handeled = NO;
|
||||
AtomController *controller = [[self keyWindow] windowController];
|
||||
|
||||
// The keyWindow could be a Cocoa Dialog or something, ignore that.
|
||||
if ([controller isKindOfClass:[AtomController class]]) {
|
||||
JSValueRef value = [controller.jscocoa callJSFunctionNamed:@"handleKeyEvent" withArguments:event, nil];
|
||||
handeled = [controller.jscocoa toBool:value];
|
||||
}
|
||||
|
||||
if (!handeled) [super sendEvent:event];
|
||||
}
|
||||
else {
|
||||
[super sendEvent:event];
|
||||
}
|
||||
}
|
||||
|
||||
// AppDelegate
|
||||
- (void)applicationWillFinishLaunching:(NSNotification *)aNotification {
|
||||
|
||||
Reference in New Issue
Block a user