Skip to content

Simple global keyboard, mouse hook and simulation library written C#

Notifications You must be signed in to change notification settings

20chan/GlobalHook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GlobalHook

Very simple mouse, keyboard global hooking library written in C#

HowToUse

Hooking

Add KeyboardHook.HookStart() or MouseHook.HookStart() at starts. All events must return boolean value. If returned value is false, that event go out.

Simulation

Just call method

Examples

Locking left windows key

KeyboardHook.KeyDown += (int vkCode) => (Keys)vkCode != Keys.LWin;

Watch all mouse down

MouseHook.MouseDown += (MouseEventType type, int x, int y) => {
    Console.WriteLine($"{type} Down at: {x}, {y}");
    return true;
};

Press Escape

KeyboardSimulation.MakeKeyEvent((int)Keys.Escape, KeyboardEventType.KEYCLICK);

Scroll mouse down

MouseSimulation.MouseScroll(MouseScrollType.DOWN);

About

Simple global keyboard, mouse hook and simulation library written C#

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages