Support capital letters and special character literals in key_press and type_keys

Patch by Martin Doppelreiter