当前位置: 动力学知识库 > 问答 > 编程问答 >

.net - Sending ctrl-space with SendKeys in C#?

问题描述:

I'm doing some basic automation type stuff and I need to send ctrl-space to the desktop (I need to make sure that nothing is selected so that when I do SendKeys.SendWait("+{F10}"); I get the generic desktop menu, not the one for any specific file). I've tried the obvious things (actual space character, "SPACEBAR", "SPACE") and none of them work, they all give me a n ArgumentException. Anybody know the right way to do this?

C# on .NET 4.0 and Windows 7, if any of that makes a difference.

网友答案:

The documentation for this is here:

I think what you are after is

SendKeys.SendWait("^( )");
分享给朋友:
您可能感兴趣的文章:
随机阅读: