Note

If you are on Windows, see this post instead.

In my last post (almost two years ago, wow), I showed how you can more easily type ‘_’ characters in Windows using the SHIFT+SPACE key combination. Well, it’s just as easy in Linux thanks to keyd curtesy of rvaiya.

First, install keyd as shown on its Github link above. For recent releases of Debian and Ubuntu, it now exists in the standard APT repositories, so installation is as easy as sudo apt install keyd. 🥳

You’ll need to add your user to the keyd group to enable keyd functionality for your user. Do this by running sudo usermod -aG keyd {username}.

Finally, add a keyd config file to setup the SHIFT+SPACE as ‘_’ shortcut. Put the following in the file /etc/keyd/default.conf.

[ids]
*

[shift]
space = S-minus

You may also need to enable and start the keyd service if the installation didn’t do that for you. Run the following commands to do that.

  • sudo systemctl enable keyd
  • sudo systemctl start keyd

Because your user needed to be added to the keyd group, you’ll need to log out and log back in to see the effect.