I tested my Root Keys for my bitcoin wallet on my online computer. Is their anyway the keys can get stolen when I input them; like if I have a keylogger on my system?
In theory, yes.
IMHO, the best practice would be to never let these keys touch a networked computer (for any wallet that is going to contain a significant amount of coins), but instead restrict them only to a permanently offline, air-gapped machine.