It is all the same...
Unfortunately copy and paste is also no solution. It does the exact same thing
as typing, except it does not collect key-strokes from the keyboard but from
the copy-buffer (the clip-board) and places them in the key-stroke buffer.
And... any program can read the key-stroke buffer. It has to, or your software
could not run.
Think of it this way: If your program or your yahoo or Gmail inlog-screen can
read those key-strokes, so can any other program.
Even a voice-recognition system would have the same problem.
Did you ever notice that sometimes a website asks you to type in a
"graphically concealed" string of characters. They do this to prevent automatic
systems from responding. They even have to "hide" and "distort" the
characters to prevent software from recognizing them... from the screen.
The only thing you can do is change your password regularly and choose it wisely. (not
your date of birth and not your middle name)