On Linux, there is an easy way to type accented or special characters with QWERTY keyboards. This is through something called the Compose Key.
To enable it on GNOME, install Tweaks and go to Keyboard & Mouse > Compose Key.
To enable it on KDE, go to System Settings > Input Devices > Keyboard > Advanced.
I set mine to Right Alt, because I never use that key for anything else.
Here are some common Compose Key sequences:
| Sequence | Character |
|---|---|
| ' + e | é |
| " + o | ó |
| ~ + n | ñ |
| , + c | ç |
| ^ + e | ê |
| - + e | ē |
| o + a | å |
| ! + ! | ¡ |
| ? + ? | ¿ |
| s + s | ß |
| a + e | æ |
| e + e | ə |
| 1 + 2 | ½ |
| 3 + 4 | ¼ |
There are like five thousand of these. You can see the full list in this file:
/usr/share/X11/locale/en_US.UTF-8/Compose