Translations:System Settings/Input Devices/8/en
Compose is a feature that allows you to write any character you want, no matter the keyboard layout you are using, by pressing a certain key (Compose key) and a series of keys. You could, i.e., associate ‘~’ and ‘n’ characters so they get replaced by a ‘ñ’ character when they are pressed after pressing Compose key. There are many default key combinations, and you can customize Compose configuration file so it better fits your specific needs. You will find more information here.