If you've come here, you probably know what code-golf is, and that's what I'm going to assume.
Keyboards are input devices we use all the time. They existed before mice and touch screen, etc.
Their fundamentals have not changed: when you press a key down, a signal is sent to the computer. When you release it, another signal is sent.
So here's the challenge: calculate the minimum number of signals(length of a signal does not matter) depending on the input string.
Explanation: All keys have to be pressed down and released
Explanation: Shift has to be pressed, then T, down, up, E, down, up, then release shift, then s down, up, then t down, up, totalling up to 10.
Any language is accepted.
This is code-golf, so shortest code in bytes wins.
Programs with incorrect outputs will be disqualified.
The keyboard layout used should be this: http://dry.sailingissues.com/keyboard-US-International.png
Only characters in this keyboard layout will be used (+lowercase letters).
Using Caps-Lock is ok, since it DOES have an advantage: numbers remain numbers while letters become uppercase.