if there is a trojan or a keylogger in your pc, of course they will steal your data.
so even if your pc was off if they have you private key, decrypted. they can stole your money.
but if it's encrypted it will not stop them but just delay them.
and the most of trojans or keyloggers cannot be detectd by the most AVs (i'm got some victims of my keylogger the detection of AVs ar just 3 anti-viruss that detect it)
and the most of hackers or data stollers just stole passwords (especially paypal , banks) and credit cards numbers but i don't think about bitcoin private keys.