mirror of
https://github.com/electron/electron.git
synced 2026-02-14 09:05:01 -05:00
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
390 B
Plaintext
15 lines
390 B
Plaintext
#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];
|
|
}
|
|
|
|
} |