After Ubuntu switched to Gnome, I installed the workspace-grid Gnome extension to have a grid of workspaces like in Unity. While I can switch left and right using ctrl+alt+left/right arrow key, moving up and down is more tricky. I need to use function+super+up/down key. It's jarring having to switch keys for the same action. Also, in some applications like Chrome, pressing function+super+up/down key scrolls down instead of changing workspace. I would like to change the up/down shortcut to ctrl+alt+up/down arrow key.

Looking at the github repo for the extension, it says:

Workspaces can be changed by the user by a number of ways, and the ways this extension overrides are:

  • keybindings (Main.wm.setKeybindingHandler (GNOME 3.2), Meta.keybindings_set_custom_handler (GNOME 3.4))

So what is Meta.keybindings_set_custom_handler and how do I go about setting it?


1 Answer 1


Meta.keybindings_set_custom_handler refers to the gnome3 sourcecode - this is not a "setting" in the normal sense.

It is a function in the gnome-shell sourcecode in javascript, see here

  setCustomKeybindingHandler: function(name, modes, handler) {
        if (Meta.keybindings_set_custom_handler(name, handler))
            this.allowKeybinding(name, modes);

or in use, at this custom extension

function enable() {
    Meta.keybindings_set_custom_handler('switch-group', _doSwitchDesktop);
    Meta.keybindings_set_custom_handler('switch-group-backward', _doSwitchDesktop);

function disable() {
    Meta.keybindings_set_custom_handler('switch-group', Lang.bind(Main.wm, Main.wm._startAppSwitcher));
    Meta.keybindings_set_custom_handler('switch-group-backward', Lang.bind(Main.wm, Main.wm._startAppSwitcher));

If you write your own extension or rewrite an existing one, you can "set" it - if you will.

  • 1
    I've reposted this answer from the duplicate question Feb 21, 2018 at 7:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.