Create custom keyboard shortcut in Ubuntu 17.10 / 18.04
Follow the steps below.
- Go to Settings -> Devices -> Keyboard.
- Scroll to bottom, and click the "+" (plus) sign.
- Enter the command and assign a shortcut key.
For those who can't manage to find the adequate Settings (Ubuntu 18.04 maybe?), run in a terminal:
gnome-control-center
...then follow the procedure that @opensas mentioned:
- Go to Settings -> Devices -> Keyboard.
- Scroll to bottom, and click the "+" (plus) sign.
- Enter the command and assign a shortcut key.