Use cmd on mac (#1562)

This commit is contained in:
2023-03-04 13:13:42 -05:00
parent 45e788dc51
commit 7eec778532
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -13,7 +13,8 @@ export default new class DevToolsListener extends Builtin {
}
toggleDevTools(e) {
if (e.ctrlKey && e.shiftKey && e.key === "I") {
const metaKey = process.platform === "darwin" ? e.metaKey : e.ctrlKey;
if (metaKey && e.shiftKey && e.key === "I") {
e.stopPropagation();
e.preventDefault();
if (this.get(this.collection, this.category, this.id)) IPC.toggleDevTools();
@@ -15,7 +15,8 @@ export default new class InspectElement extends Builtin {
}
inspectElement(e) {
if (e.ctrlKey && e.shiftKey && e.key === "C") { // Ctrl + Shift + C
const metaKey = process.platform === "darwin" ? e.metaKey : e.ctrlKey;
if (metaKey && e.shiftKey && e.key === "C") { // Ctrl/Cmd + Shift + C
IPC.inspectElement();
}
}