diff --git a/files/usr/share/cinnamon/cinnamon-settings/bin/KeybindingTable.py b/files/usr/share/cinnamon/cinnamon-settings/bin/KeybindingTable.py index 75a373d390..65d3d6ec3d 100644 --- a/files/usr/share/cinnamon/cinnamon-settings/bin/KeybindingTable.py +++ b/files/usr/share/cinnamon/cinnamon-settings/bin/KeybindingTable.py @@ -172,7 +172,9 @@ ], [ [_("Switch to left workspace"), MUFFIN_KEYBINDINGS_SCHEMA, "switch-to-workspace-left"], - [_("Switch to right workspace"), MUFFIN_KEYBINDINGS_SCHEMA, "switch-to-workspace-right"] + [_("Switch to right workspace"), MUFFIN_KEYBINDINGS_SCHEMA, "switch-to-workspace-right"], + [_("Switch to up workspace"), MUFFIN_KEYBINDINGS_SCHEMA, "switch-to-workspace-up"], + [_("Switch to down workspace"), MUFFIN_KEYBINDINGS_SCHEMA, "switch-to-workspace-down"] ] ], [_("System"), "system", None, "xsi-emblem-system-symbolic", @@ -969,4 +971,4 @@ def get_default(): global instance if instance is None: instance = KeybindingTable() - return instance \ No newline at end of file + return instance diff --git a/files/usr/share/cinnamon/cinnamon-settings/modules/cs_keyboard.py b/files/usr/share/cinnamon/cinnamon-settings/modules/cs_keyboard.py index 54a4ad7f88..19f8c2479a 100755 --- a/files/usr/share/cinnamon/cinnamon-settings/modules/cs_keyboard.py +++ b/files/usr/share/cinnamon/cinnamon-settings/modules/cs_keyboard.py @@ -25,6 +25,7 @@ MASKS = [Gdk.ModifierType.CONTROL_MASK, Gdk.ModifierType.MOD1_MASK, Gdk.ModifierType.SHIFT_MASK, Gdk.ModifierType.SUPER_MASK] + class Module: comment = _("Manage keyboard settings and shortcuts") name = "keyboard" diff --git a/js/ui/main.js b/js/ui/main.js index fef6e092df..41d4fee829 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -1225,10 +1225,16 @@ function _stageEventHandler(actor, event) { wm.actionMoveWorkspaceRight(); return true; case Meta.KeyBindingAction.WORKSPACE_UP: + wm.actionMoveWorkspaceUp(); + return true; + case Meta.KeyBindingAction.WORKSPACE_DOWN: + wm.actionMoveWorkspaceDown(); + return true; + case Meta.KeyBindingAction.TOGGLE_WORKSPACE_SELECTION: overview.hide(); expo.hide(); return true; - case Meta.KeyBindingAction.WORKSPACE_DOWN: + case Meta.KeyBindingAction.TOGGLE_WINDOW_SELECTION: overview.hide(); expo.hide(); return true; diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index d95dce4a13..8df93766d8 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -357,6 +357,8 @@ var WindowManager = class WindowManager { this._cinnamonwm.connect('filter-keybinding', this._filterKeybinding.bind(this)); global.window_manager.connect('switch-workspace', (c, f, t, d) => this._switchWorkspace(c, f, t, d)); + Meta.keybindings_set_custom_handler('toggle-window-selection', (d, w, b) => this._showWorkspaceSwitcher(d, w, b)); + Meta.keybindings_set_custom_handler('toggle-workspace-selection', (d, w, b) => this._showWorkspaceSwitcher(d, w, b)); Meta.keybindings_set_custom_handler('move-to-workspace-left', (d, w, b) => this._moveWindowToWorkspaceLeft(d, w, b)); Meta.keybindings_set_custom_handler('move-to-workspace-right', (d, w, b) => this._moveWindowToWorkspaceRight(d, w, b)); @@ -1383,11 +1385,11 @@ var WindowManager = class WindowManager { _showWorkspaceSwitcher(display, window, binding) { let bindingName = binding.get_name(); - if (bindingName === 'switch-to-workspace-up') { + if (bindingName === 'toggle-workspace-selection') { Main.expo.toggle(); return; } - if (bindingName === 'switch-to-workspace-down') { + if (bindingName === 'toggle-window-selection') { Main.overview.toggle(); return; } @@ -1399,6 +1401,10 @@ var WindowManager = class WindowManager { this.actionMoveWorkspaceLeft(); } else if (bindingName === 'switch-to-workspace-right') { this.actionMoveWorkspaceRight(); + } else if (bindingName === 'switch-to-workspace-up') { + this.actionMoveWorkspaceUp(); + } else if (bindingName === 'switch-to-workspace-down') { + this.actionMoveWorkspaceDown(); } }