Typing dead key after base letter

compose-keydead keyskeyboardkeyboard-layout

The US International keyboard allows to add diacritics by means of dead keys.
Specifically:

`a maps to à and
'a maps to á.

In X, using the international or the standard US keyboard, I would like instead to set mappings like this:

a` maps to á and
a' maps to à.

As you can see, I would like the dead key to be typed after the base letter and also I prefer to swap the acute and grave accent dead keys. (This makes typing much faster and natural for me and, in case the dead key functionality is disabled, words with attached diacritics are more readable).

Can you address me to the proper tools/config files to achieve this?
In case it is relevant to the answer, my distro is Arch Linux.

Best Answer

One option is to use Compose mode

  1. Revert to your standard keyboard, rather than the US keyboard with deadkeys
  2. Enable compose mode. I happen to like Alt Gr as my compose key

To enter a letter with a diacritic you prefix the character pair with the chosen compose key. For example, Alt Gra' results in á. And Alt Gro/ results in ø. Alt Gr < < gives «. Etc.

Related Question