I recently installed Ubuntu 20.4 and looking a way to write French accents. On Windows I used TypeIt app which provides a fast way to write different accents of the same letter. The idea is to press AltGr+a key, each time you press the same key while holding AltGr it will type that key with different accents.
For example, I press AltGr+e once - it types é, I keep holding AltGr and press e second time - it types è, third time - ê.
I was looking on the Internet how to change keys mapping but didn't find a way of assigning multiple different letters based on how many times I pressed a key.
I am aware of US intern. + dead keys, but this way doesn't look convenient for me.