I want to write a programm which measures the time between two keyboard events,to determine whether it's a normal guy typing or something like keystroke injection
I know how to measure the time (StopWatch class), i just dont know how to observe keyboard inputs
{
Stopwatch sw = new Stopwatch();
try
{
if (e.RoutedEvent == Keyboard.KeyDownEvent)
{
sw.Start();
PrevTime = CurrentTime;
}
else
{
sw.Stop();
CurrentTime = sw.ElapsedMilliseconds;
}
How do i get the events i want in e ?