This project demonstates how to prevent keystroke recording for your application.
Actually it would be a keystroke recorder jammer, because it sends out a continuous stream of random keystrokes and validates these against the internal streambuffer.
Assumes
I am currently working on an implementation of this code to protect any focussed Password field on the system.