be6d990a97
When the renderer doesn't handle a key event, we pass it off to the main menu to see if it can handle it. Part of #2.
15 lines
No EOL
390 B
Text
15 lines
No EOL
390 B
Text
#import "browser/default_web_contents_delegate.h"
|
|
|
|
#import "content/public/browser/native_web_keyboard_event.h"
|
|
#import <AppKit/AppKit.h>
|
|
|
|
namespace brightray {
|
|
|
|
void DefaultWebContentsDelegate::HandleKeyboardEvent(content::WebContents*, const content::NativeWebKeyboardEvent& event) {
|
|
if (event.skip_in_browser)
|
|
return;
|
|
|
|
[[NSApp mainMenu] performKeyEquivalent:event.os_event];
|
|
}
|
|
|
|
} |