Only by using the on-screen keyboard, unfortunately. If you find out how, let me know...
Do not believe that is correct (has still only got the Gemini, but assume it is the same on the Cosmo):
If you long-press ANY key (in a text field), there will be a pop-up with alternatives for that letter. You can then either touch the letter you want on the screen, OR enter the number (on the keyboard) that is also displayed on the "key" on the screen...
(There might be some setting that disables this "long-press behavior", so might check some of the settings for language and/or keyboard if it doesn't work...)
(I also see someone else has posted this as I'm composing this, but one might have to go in to settings to get it to work, so I'll post it "again" anyway... )