Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您将如何在 C# 中发送特定键的键命令或按键,特别是数字。
例如,我想以编程方式模拟键入“512”。
可能相关:C# SendKeys.Send
如果你会使用inputsimulator你可以这样做:
var number = 2011; InputSimulator.SimulateTextEntry(number.ToString());
整数变量没有 UI,所以不能有按键。
事件是针对视觉对象的,而不是针对变量的