Best bet is to use a clean machine with a wired keyboard. (Wireless/Bluetooth keyboards have a greater attack surface.) A simple trick is to not enter your password completely sequentially, but instead to enter some of it, then reposition your cursor using the mouse, and then type the rest of it. This will likely thwart attacks not targeted specifically at you, at least as long as this technique isn't widely used.