Another way would be brute force, to prevent this from happening, you need a strong password with much charachters and special numbers/symbols and uppercase and lowercase. To prevent keylogging, do not download anything fishy or from a non reliable source!
Don't forget that Microsoft has installed a keylogger in Windows 10.
Wow i don't know that microsoft has installed keylogger in windows 10. Actually it's easy to prevent hacker, don't download something that suspicious and download anti malware and spyware.
But if you own bitcoin I would not be worried about Microsoft, they won't steal your bitcoins, they just like to spy on you.