开发者

Can the sendinput API simulate a keyboard key being held down during some time?

开发者 https://www.devze.com 2022-12-16 16:13 出处:网络
My app will need to simulate a key being held down during some time. I don\'t know how many time. Can I use the开发者_如何学Go sendinput API for this?SendInput can trigger events with INPUT structures

My app will need to simulate a key being held down during some time. I don't know how many time. Can I use the开发者_如何学Go sendinput API for this?


SendInput can trigger events with INPUT structures including KEYBDINPUT. A KEYBDINPUT can specify key up and key down events using virtual keys or scan codes. So you want to use SendInput twice: send a key down event at the beginning, and a key up event at the end.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号