How can I send a period with the Sendkeys.SendWait() function?

◇◆丶佛笑我妖孽 提交于 2019-12-02 18:39:23

问题


How do I send a period using sendkeys? I have tried:

System.Windows.Forms.SendKeys.SendWait("{.}"); 
System.Windows.Forms.SendKeys.SendWait(".");

but neither of these work. I am trying to send the keyboard shortcut to a Google search window to enable voice search in Chrome. The shortcut is CTRL+SHIFT+PERIOD, I know how to do the ctrl+shift, just not the period. Anyone have any ideas? Any help is appreciated, thank you.


回答1:


Try this: System.Windows.Forms.SendKeys.SendWait(Keys.OEMPeriod);




回答2:


Have you considered the Keys enum? It has a "decimal"

System.Windows.Forms.SendKeys.SendWait(Keys.Decimal)


来源:https://stackoverflow.com/questions/11195753/how-can-i-send-a-period-with-the-sendkeys-sendwait-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!