How windows OS processes input events? - C#