C# handles mouse and keyboard events