Suggestion: Virtual keyboard to defend against audio keylogging

Are these correct ?
To prevent keylogger, we use virtual keyboard.
To prevent audio keylogging, we use xvkbd.

How about RAT (remote access trojan) ?
How to prevent RAT ?
RAT allow attacker to see what we click on virtual keyboard.
Can RAT penetrate Qubes ?

Please help me with xvkbd installation steps in the link below.