Very simple mouse, keyboard global hooking library written in C#
Add KeyboardHook.HookStart()
or MouseHook.HookStart()
at starts.
All events must return boolean value. If returned value is false, that event go out.
Just call method
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);