Search code examples
gnomegnome-shell

In Gnome (gnome-shell) can you set multiple shortcut keys instead of just a single?


The Gnome GUI (gnome-shell) only lets you set a single shortcut key. Can you for instance set Super+Tab and Alt+Tab to both switch applications?


Solution

  • Yes, you can. This is verified to work on Ubuntu 20.10 and 21.04RC.

    The following commands acheive the requested outcome:

    gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Shift><Super>Tab', '<Shift><Alt>Tab']"
    gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Super>Tab', '<Alt>Tab']"
    

    For more options see here:

    # list all keybindings
    gsettings list-recursively | grep -e org.gnome.desktop.wm.keybindings -e org.gnome.settings-daemon.plugins.media-keys -e org.gnome.settings-daemon.plugins.power | sort 
    
    # confirm no other keybinding conflicts
    gsettings list-recursively | grep '<Control>1'
    
    # set multiple keybindings for "Switch to Workspace 1"
    gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['<Super>Home', '<Control>1']"
    
    # confirm value is set correctly
    gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-1
    

    from here.