Skip to content

🔒 A simple Keylogger API written in C# that works for any Windows OS version

License

Notifications You must be signed in to change notification settings

rainxh11/ForkOf_KeystrokeAPI

 
 

Repository files navigation

KeystrokeAPI

A simple Keystroke API written in C# that works for any version of Windows. It abstracts the access to the win32.dll and the handling of low level hooks (only keyboard for now).

Instalation

Install-Package KeystrokeAPI

How to use

1 - Call the CreateKeyboardHook() method passing your callback like this:

api.CreateKeyboardHook((character) => { Console.Write(character); });

2 - Implement your own "Windows Message Loop" OR call this:

Application.Run();

NOTE: This call starts the windows message loop for you, but you will need to reference the System.Windows.Forms.dll in your project. Click here to know why.

Code Example (using a Console Application)

class Program
{
    static void Main(string[] args)
    {
        using (var api = new KeystrokeAPI())
        {
            api.CreateKeyboardHook((character) => { Console.Write(character); });
            Application.Run();
        }
    }
}

About

🔒 A simple Keylogger API written in C# that works for any Windows OS version

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 98.8%
  • Batchfile 1.2%