I added both the Spanish default keyboard layout and the Spanish with dead keys layout from System Settings, but in most applications,when I try to do an accentuated á vowel, in turn it writes: ´a. In some other cases, like in Telegram, the ´ symbol does not appear at all.
I have tried updating, removing all layouts, and what this question suggests on AskUbuntu: https://askubuntu.com/questions/774237/dead-keys-accents-stopped-working-after-upgrading-to-ubuntu-16-04, which is to run
ibus-setup and following the instructions, but none worked.
Running elementary OS 0.4 Loki (Ubuntu 16.04 LTS)