To write Spanish letters with accents follow these instructions.
1. press control + accent mark +letter to accent
2. Inverted question mark: press CTL+SHIST+ALT and question mark.
3. Tilde: Press CTL + SHIFT + TILDE SIGN and then letter n.
OR
1. On Number pad:
Press alt + 160 = á
Press alt + 130=é
Press alt + 161=í
Press alt + 162=ó
Press alt + 163=ú
Press alt + 164=ñ
Press alt + CTRL + SHIFT= inverted question mark ¿
Press alt + CTRL + SHIFT +!= ¡