Witam mam problem, otóż nie wiem jak zmodyfikować kod, aby zamiast rejestrowania przytrzymania klawisza rejestrowało pojedyncze kliknięcie
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
namespace ConsoleApp1
{
class Program
{
[DllImport("User32.dll")]
public static extern int GetAsyncKeyState(Int32 i);
static void Main(string[] args)
{
while (true)
{
Thread.Sleep(5);
for(int i = 32; i < 127; i++)
{
int keystate = GetAsyncKeyState(i);
if (keystate != 0)
{
Console.WriteLine(i);
}
}
}
}
}
}