For generating special characters, I have always used the United States-International keyboard, wherein some keys become dead keys, that is, they wait until the next character is typed. You can then use ~^`'" to generate diacriticals. To recover the original value of the keys, you have to press them twice.
Julio