Skip to content

Instantly share code, notes, and snippets.

View andriyshevchenko's full-sized avatar
👨‍🎓

Andriy andriyshevchenko

👨‍🎓
View GitHub Profile
@Larry57
Larry57 / KeyboardHook.cs
Created April 11, 2013 18:08
A global Keyboard Hook that works in WPF and is also high CPU load proof. Credits: http://blogs.vertigo.com/personal/ralph/Blog/Lists/Posts/Post.aspx?ID=8
public class KeyboardHook
{
#region pinvoke details
private enum HookType : int
{
WH_JOURNALRECORD = 0,
WH_JOURNALPLAYBACK = 1,
WH_KEYBOARD = 2,
WH_GETMESSAGE = 3,