diff --git a/src/ZenKeyboardShortcuts.mjs b/src/ZenKeyboardShortcuts.mjs index 1d7357c..b67fdaf 100644 --- a/src/ZenKeyboardShortcuts.mjs +++ b/src/ZenKeyboardShortcuts.mjs @@ -85,12 +85,13 @@ const fixedL10nIds = { const ZEN_COMPACT_MODE_SHORTCUTS_GROUP = 'zen-compact-mode'; const ZEN_WORKSPACE_SHORTCUTS_GROUP = 'zen-workspace'; const ZEN_OTHER_SHORTCUTS_GROUP = 'zen-other'; +const ZEN_SPLIT_VIEW_SHORTCUTS_GROUP = 'zen-split-view'; const FIREFOX_SHORTCUTS_GROUP = 'zen-kbs-invalid'; const VALID_SHORTCUT_GROUPS = [ ZEN_COMPACT_MODE_SHORTCUTS_GROUP, ZEN_WORKSPACE_SHORTCUTS_GROUP, - ZEN_OTHER_SHORTCUTS_GROUP, - 'other', ...Object.keys(defaultKeyboardGroups) + ZEN_SPLIT_VIEW_SHORTCUTS_GROUP, + ...Object.keys(defaultKeyboardGroups), ZEN_OTHER_SHORTCUTS_GROUP, 'other' ]; class KeyShortcutModifiers { @@ -598,6 +599,52 @@ var gZenKeyboardShortcutsManager = { ) ); + // Split view + newShortcutList.push( + new KeyShortcut( + 'zen-split-view-grid', + 'G', + '', + ZEN_SPLIT_VIEW_SHORTCUTS_GROUP, + KeyShortcutModifiers.fromObject({ctrl: true, alt: true}), + 'code:gZenViewSplitter.toggleShortcut(\'grid\')', + 'zen-split-view-shortcut-grid' + ) + ); + newShortcutList.push( + new KeyShortcut( + 'zen-split-view-vertical', + 'V', + '', + ZEN_SPLIT_VIEW_SHORTCUTS_GROUP, + KeyShortcutModifiers.fromObject({ctrl: true, alt: true}), + 'code:gZenViewSplitter.toggleShortcut(\'vsep\')', + 'zen-split-view-shortcut-vertical' + ) + ); + newShortcutList.push( + new KeyShortcut( + 'zen-split-view-horizontal', + 'H', + '', + ZEN_SPLIT_VIEW_SHORTCUTS_GROUP, + KeyShortcutModifiers.fromObject({ctrl: true, alt: true}), + 'code:gZenViewSplitter.toggleShortcut(\'hsep\')', + 'zen-split-view-shortcut-horizontal' + ) + ); + newShortcutList.push( + new KeyShortcut( + 'zen-split-view-unsplit', + 'U', + '', + ZEN_SPLIT_VIEW_SHORTCUTS_GROUP, + KeyShortcutModifiers.fromObject({ctrl: true, alt: true}), + 'code:gZenViewSplitter.toggleShortcut(\'unsplit\')', + 'zen-split-view-shortcut-unsplit' + ) + ); + return newShortcutList; }, diff --git a/src/ZenSidebarManager.mjs b/src/ZenSidebarManager.mjs index c3ef31d..abb1994 100644 --- a/src/ZenSidebarManager.mjs +++ b/src/ZenSidebarManager.mjs @@ -10,7 +10,7 @@ var gZenBrowserManagerSidebar = { contextTab: null, DEFAULT_MOBILE_USER_AGENT: 'Mozilla/5.0 (Android 12; Mobile; rv:129.0) Gecko/20100101 Firefox/130.0', - MAX_SIDEBAR_PANELS: 8, // +1 for the add panel button + MAX_SIDEBAR_PANELS: 9, // +1 for the add panel button MAX_RUNS: 3, init() {