Use cmd on mac (#1562)

This commit is contained in:
Zerebos 2023-03-04 13:13:42 -05:00 committed by GitHub
parent d1183633c0
commit b266368e46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

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();

View File

@ -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();
}
}