I have the following code :
Process.Start("cmd.exe");
System.Threading.Thread.Sleep(1000);
SendKeys.Send("{D}{I}{R}{SPACE}{ENTER}");
I know that Space does not do anything here, but I’m trying to solve another issue so my question is why do I get this exception Keyword "SPACE" is not valid.? How can I send space?
You only need to escape special characters (list at the page here), the rest, including space, can just be written as is;