Need to send simulated user input to the game window? Unity provides the EditorGUIUtility.QueueGameViewInputEvent method for doing just that. Using this method you could construct a utility that captures and plays back user input as your game is running which would be handy for debugging and unit testing purposes.