This same question has been asked in another of our forums, and has been locked there. So I'm doing the same here.
The assumption is that installing an invisible keylogger on a PC that's use by somebody else (the only reason to have it invisible) is illegal in most countries.
Using a keylogger to log your own keystrokes (and more) is allowed, of course. But then there's no need to have it invisible.