Fix Ctrl-Shift-Alt-Down Not Working in IDEs (Override GNOME Shortcuts on Linux)

mail
Cyrus Kao
Last modified

In most of IDEs (Integrated Development Environment) like Visual Studio Code, Sublime Text and Atom has default keyboard shortcuts to copy line down/up with Ctrl-Shift-Alt-Down and Ctrl-Shift-Alt-Up.

On Linux distros (e.g. Ubuntu, Fedora, CentOS, Arch Linux) using GNOME as DE will encounter an issue where GNOME's key bindings conflict with IDEs'. So when pressing Ctrl-Shift-Alt-Down on your text editor it simply doesn't work. To fix this, we'll covering how to edit gsettings in both CLI and GUI.

Fix with CLI (Command-Line Interface)

Use gsettings list-recursively to find commands bind to <Control><Shift><Alt>Down and <Control><Shift><Alt>Up:

gsettings list-recursively org.gnome.desktop.wm.keybindings | grep '<Control><Shift><Alt>Down\|<Control><Shift><Alt>Up'
Bash
org.gnome.desktop.wm.keybindings move-to-workspace-down ['<Control><Shift><Alt>Down']
org.gnome.desktop.wm.keybindings move-to-workspace-up ['<Control><Shift><Alt>Up']
Output

Use gsettings set to set key bindings to an empty array []:

gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-down []
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-up []
Bash

Fix with GUI (Graphical User Interface)

The process is pretty much the same with CLI, but done in dconf editor.

Install dconf

dconf is a GUI tool to edit gsettings, to install:

  • Debian/Ubuntu

    sudo apt-get install dconf-editor
    Bash
  • Arch Linux/Manjaro

    yay -S dconf
    Bash

    Don't know how to install packages on Arch based Linux? A full guide on Two Ways to Install Packages from AUR on Arch Linux/Manjaro.

  • Fedora/CentOS 8+

    sudo dnf install dconf-editor
    Bash
  • CentOS

    sudo yum install dconf-editor
    Bash

Release Key Bindings

Open dconf then navigate to /org/gnome/desktop/wm/keybindings/ which is where key bindings are set:

/org/gnome/desktop/wm/keybindings/
Navigate to /org/gnome/desktop/wm/keybindings/ in dconf

Find commands bind to <Control><Shift><Alt>Down and <Control><Shift><Alt>Up, usually move-to-workspace-down and move-to-workspace-up :

move-to-workspace-up
move-to-workspace-up in key bindings

Unchecked Use default value and set the value to an empty array [] then press apply:

Setting value
Set value to an empty array

Comments

0500