mac: Make cmd+~ work for devtools window, fixes #508.
This commit is contained in:
parent
53c73c0631
commit
f7a9b56e93
1 changed files with 5 additions and 1 deletions
|
@ -538,7 +538,11 @@ void NativeWindowMac::HandleKeyboardEvent(
|
||||||
// The event comes from detached devtools view, and it has already been
|
// The event comes from detached devtools view, and it has already been
|
||||||
// handled by the devtools itself, we now send it to application menu to
|
// handled by the devtools itself, we now send it to application menu to
|
||||||
// make menu acclerators work.
|
// make menu acclerators work.
|
||||||
[[NSApp mainMenu] performKeyEquivalent:event.os_event];
|
BOOL handled = [[NSApp mainMenu] performKeyEquivalent:event.os_event];
|
||||||
|
// Handle the cmd+~ shortcut.
|
||||||
|
if (!handled && (event.os_event.modifierFlags & NSCommandKeyMask) &&
|
||||||
|
(event.os_event.keyCode == 50 /* ~ key */))
|
||||||
|
Focus(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue