1

In Ubuntu I used to be able to go to Settings > Keyboard Shortcuts and set a shortcut such as Super+Esc, but that no longer seems to be the case in Ubuntu 20.04. Any shortcut involving the Esc key doesn't seem to work. I imagine this is because the Esc key is used to cancel the shortcut entry routine @ Settings > Keyboard Shortcuts.

Is there a manual way to define keyboard shortcuts in the terminal, or some other way to assign a keyboard shortcut such as Super+Esc?

  • You want super+esc as a short cut rite.. Esc alone should do its own job.. am I rite? – UnKNOWn Jul 30 at 12:36
  • @PRATAP that is correct, I want Super+Esc as the shortcut. But I can't even enter Super+Esc as a shortcut option through the Settings > Keyboard Shortcuts dialogue. Presumably because this combination includes Esc. I used to be able to do this on Ubuntu 18.04. – Jason Hunter Jul 30 at 12:49
  • Super+Esc combo is already give out of the box.. Just disable that and you are good to go.. i.stack.imgur.com/iIbar.png – UnKNOWn Jul 30 at 13:30
1

The combination you are looking for is a default keyboard shortcut for "Restore the keyboard shortcuts"

enter image description here

Disable it first to use the combination for your custom keyboard shortcut.

enter image description here

enter image description here

| improve this answer | |
1

To add a keyboard shortcut that is disallowed by the sanity checking in the GUI, add via the command-line instead. See "https://techwiser.com/custom-keyboard-shortcuts-ubuntu/".

Check first for an already existing custom list:

gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings

If the list doesn't already exist, then create one:

gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"

Then add your shortcut:

gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name "'my_new_shortcut'"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding "'<Super><Esc>'"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command "'<path/thing to execute>'"
| improve this answer | |

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.