Ending keystroke recording with permissions.

I was just thinking that every time I imagine a computer being compromised, I always think that it is safe because the hacker doesn’t know the password. But with keyword logging, they can eventually figure that out over time do to another virus that infects the computer. So I was wondering about the details of securing keylogging so that spyware and viruses cannot record keystrokes, but yet the use of keylogging can still bring a benefit to the user.

I was thinking that what if there was some logic or software to create permissions to be able to copy the keystrokes from memory, as the recording of it into the firmware, BIOS or software is not the issue, but where it goes after IS the issue. If the user is using a program, then it should go without saying that the program has that permission. But there is no program needed for keylogging for keying in passwords for a program, so that would be a red flag if something is being copied at that time to another program, as keywords being typed using Microsoft Word is fine because you wouldn’t be typing in passwords or social security numbers. So there should be no permission to send the keystrokes any where else other then that password. It shouldn’t let you copy the key strokes to other programs unless there is permission to do so.

I am just thinking that having permissions to copy from the key log should prevent passwords from being lifted.