无法在 C# 中使用 Sendkeys 发送下划线?
我很无聊,所以我尝试编写一个程序,在按 ctrl+shift+L 时写出不赞成的笑脸(ಠ_ಠ 脸)。 现在一切正常,除了笑脸中的下划线,它根本不会被写出来。
这是我首先使用的:
SendKeys.Send("ಠ_ಠ");
我尝试了各种方法,例如在下划线周围添加 {} 括号,当然我也用谷歌搜索了这个。
有什么办法可以让下划线发送吗?
提前致谢。
I've been bored, so I tried to make a program that writes a Look of Disapproval smiley(the ಠ_ಠ face) when pressing ctrl+shift+L.
Now everything works, except for the underscore that is in the smiley, which won't get written at all.
This was what I used first:
SendKeys.Send("ಠ_ಠ");
I've tried various things, like adding {} brackets around the underscore, and of course I googled this too.
Is there any way I can get the underscore to get sent?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
混合不同的编码会产生奇怪的结果。 ಠ 是 Unicode,
_
是ASCII。不同长度的字符会让 Visual Studio 感到困惑和恼火。尝试:
或:
Mixing different encodings creates weird result. ಠ is Unicode,
_
is ASCII. Different length characters confuse and iritate Visual Studio.Try:
Or:
如果您不使用以下划线作为键的英文键盘布局,则您不能只键入 ASCII 字符,而必须将其写为修饰符和字符键的组合。
If you don't use an english keyboard layout that has the underscore as key you can't just type the ASCII character but have to write it as a combination of modifier and character keys.