I have a US keyboard, and mostly type in English. However I also want to use it occasionally for typing Portuguese; I don't want to use the GUI character map.
How can I set up the keyboard and what packages should I install so that key combinations like á = RightAlt + a will work?
I believe there is also a way to use tilde, apostrophe, and the quote key followed by a letter to achieve it, but of course it does not work by default, otherwise typing apostrophe would be difficult. However there must be a way to temporarily change something to use the keys that way.
I will mainly type in emacs, so if there is an emacs specific solution, that will also work.