In Ubuntu, to write ā, ē, ī, ū (vowel with macron or garumzīme) I type
Alt + - + letter
with the Latvian keyboard set
To write ģ, ķ, ļ, ņ (consonant with cedilla or mīkstinājuma zīme) I type
Alt + , + letter
But how to type č, š, ž (consonant with caron, háček or another type of mīkstinājuma zīme)
Alt + ??? + letter
The keyboard settings are the following:
The compose key is Right Alt
Other options for the compose key are
Disabled, Right Ctrl, Right Win, Left Ctrl, Menu, Caps Lock.
AltGr does not appear as an option.
Best Answer
The Latvian keyboard layout is prepared for the characters you mention:
AltGr + S = š
AltGr + Shift + S = Š
AltGr + C = č
AltGr + Shift + C = Č