This question already has an answer here:
I've used Linux and FreeBSD as my main desktop environments from 2000 to 2006. Back then we would have to edit keyboard maps to make Portuguese Brazilian work. Since then, I stopped using Linux as desktop and moved to MacOS because it was very time consuming to just get things done.
I've been hearing about all the evolution of the Linux desktop in the last decade and a couple of weeks ago I just bought a new Dell XPS preloaded with Ubuntu 16.04 and what a surprise... I just can't get my keyboard to work correctly!
At first I couldn't get it to write the cedilla "ç" using US-international. By following the instructions in How to type latin small letter c with cedilla I could get it to work, but now all consonants get "accented" (.e.g., '+s becomes ś or '+r becomes ŕ), which is just not possible in Portuguese. The expected behavior would be 's or 'r.
Why is it so difficult to just get things right?
I would like to know if is there any solution or workaround to this problem.
EDIT: Someone marked this as duplicate of another question on how to use multiple languages. This is not the issue here. My question is how to make Ubuntu/Linux correctly work to write Brazilian Portuguese using a US keyboard.
In other words, typing ' followed by s should output 's and not ś, meanwhile typing ' followed by a should output á and typing ' followed by c should output ç.
So, the question is how do I get this behavior?
EDIT: As I got no real answer I coded a small ibus input method, based on ibus-tmpl for solving this. Probably not a good solution, but the quickest workaround I could find. It is available on http://github.com/gcms/ibus-semidead