I think it depends on what you are trying to do. If you are looking for well-known programs for keyloggers, you can use any software that can search the file system to view the signature of files. However, it seems you want to detect unknown programs. I do not believe that this is strictly possible. Keylogging applications can passively listen for keystrokes, so there is no active signature that you could look for. It would probably be easier to understand the software that is supposed to run on your computer, and then discover any new software that will start working. This will not necessarily be key recording software, but it will be unauthorized software (or at least authorized software).
Pressing the keys is transmitted to the system as events that you can subscribe to in your application. Here's how games and other programs use keyboard input. The whole system knows when the key was pressed and which key was. You cannot know who is listening.
In other words, if it were possible, it would destroy keyboard recorders, since every anti-virus and anti-spyware application would be able to detect and remove all these types of software. They have an option similar to this, but it is based on well-known signatures of famous keystroke recorders.
source share