diff --git a/ui/system/desktop/shortcuts.js b/ui/system/desktop/shortcuts.js index 3f9fbe8..b9cbcd4 100644 --- a/ui/system/desktop/shortcuts.js +++ b/ui/system/desktop/shortcuts.js @@ -92,16 +92,17 @@ export function init(deps) { // Mod+\ : toggle density. bindKey("mod+\\", () => session.toggleDensity()); - // Mod+[ / Mod+] : cycle through views in the active desk. Overrides - // shortcuts.js's mod+]/mod+[ (which call nextPanel/prevPanel, methods - // the new desktop layoutManager shim doesn't implement). - bindKey("mod+]", () => layoutManager.cycleViews(1)); - bindKey("mod+[", () => layoutManager.cycleViews(-1)); + // Mod+[ / Mod+] : cycle through views in the active desk. + bindKey(["mod+]", "mod+tab"], () => layoutManager.cycleViews(1)); + bindKey(["mod+[", "mod+shift+tab"], () => layoutManager.cycleViews(-1)); // Mod+D : toggle layer outlines. // TODO: remove? bindKey("mod+d", () => { - if (document.body.dataset.debug) delete document.body.dataset.debug; - else document.body.dataset.debug = "true"; + if (document.body.dataset.debug) { + delete document.body.dataset.debug; + } else { + document.body.dataset.debug = "true"; + } }); } diff --git a/ui/system/mobile/layout_manager.js b/ui/system/mobile/layout_manager.js index 56d8639..a5e5852 100644 --- a/ui/system/mobile/layout_manager.js +++ b/ui/system/mobile/layout_manager.js @@ -252,13 +252,4 @@ export class MobileLayoutManager extends LayoutManager { }; }); } - - // Compatibility with desktop keyboard shortcuts - nextPanel() { - this.nextWebView(); - } - - prevPanel() { - this.prevWebView(); - } } diff --git a/ui/system/services/shortcuts.js b/ui/system/services/shortcuts.js index 67be93a..b0e2be7 100644 --- a/ui/system/services/shortcuts.js +++ b/ui/system/services/shortcuts.js @@ -1,8 +1,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later /** - * Wire the shell-level keyboard shortcuts (⌘T, ⌘W, ⌘[, …) onto the - * given layout manager. + * Wire the shell-level keyboard shortcuts onto the given layout manager. * * @param {LayoutManager} layoutManager * @param {object} ctx @@ -20,7 +19,7 @@ export function init( return false; }); - // ⌘⇧T — open a new view as a *vertical* split (new tile below active). + // mod+shift+T: open a new view as a *vertical* split (new tile below active). // The desktop's layoutManager honors the intent's `direction`; the mobile // layoutManager ignores extra args, so this is safe for both. Mousetrap.bindGlobal("mod+shift+t", () => { @@ -63,16 +62,6 @@ export function init( return false; }); - Mousetrap.bindGlobal(["mod+]", "ctrl+tab"], () => { - layoutManager.nextPanel(); - return false; - }); - - Mousetrap.bindGlobal(["mod+[", "ctrl+shift+tab"], () => { - layoutManager.prevPanel(); - return false; - }); - Mousetrap.bindGlobal("mod+e", () => { const mc = mobileComponents(); if (mc.pebble) {