What danger can a keylogger or malware pose to hardware wallet? Malware will not be able to physically press the transaction confirmation buttons for you, given that you probably double-check the sending address for correctness before confirming the sending of the transaction.
Theoretically, hardware wallets are supposed to be safe from these kind of devices.
HOWEVER, that doesn't mean the software wallets themselves are also safe. They can easily be replaced with a fake copy that prompts your hardware wallet to sign a malicious transaction, and you might fall for it if the hardware wallet doesn't show you the amount being transferred out.
Will the following gadgets pose a threat if the computer has a password to access it?
Yes, because they can download a malicious payload from the internet exploiting a zero-day vulnerability in Windows and then install a keylogger which records your password.