{"id":11953,"date":"2010-12-21T07:00:00","date_gmt":"2010-12-21T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2010\/12\/21\/how-do-i-simulate-input-without-sendinput\/"},"modified":"2010-12-21T07:00:00","modified_gmt":"2010-12-21T07:00:00","slug":"how-do-i-simulate-input-without-sendinput","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20101221-00\/?p=11953","title":{"rendered":"How do I simulate input without SendInput?"},"content":{"rendered":"<p> <a href=\"http:\/\/www.michalzygmunt.com\/\"> Michal Zygmunt<\/a> wants to create a system where multiple applications can have focus, with different users generating input and directing them at their target applications. Attempting to <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2005\/05\/30\/423202.aspx\"> simulate this by posting input messages didn&#8217;t work<\/a>. &#8220;Can you tell us maybe how SendInput is internally implemented so that we can use it to simulate only part of the actions (like without acquiring focus)?&#8221; <\/p>\n<p> <code>SendInput<\/code> operates at the bottom level of the input stack. It is just a backdoor into the same input mechanism that the keyboard and mouse drivers use to tell the window manager that the user has generated input. The <code>SendInput<\/code> function doesn&#8217;t know what will happen to the input. That is handled by much higher levels of the window manager, like the components which hit-test mouse input to see which window the message should initially be delivered to. So if your goal is to change the way you call <code>SendInput<\/code> so it changes the focus management rules, you&#8217;re barking up the wrong tree. It&#8217;s like asking, &#8220;Please tell me how RAM chips work so I can use it to change the way Lotus 1-2-3 resolves circular references.&#8221; <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Michal Zygmunt wants to create a system where multiple applications can have focus, with different users generating input and directing them at their target applications. Attempting to simulate this by posting input messages didn&#8217;t work. &#8220;Can you tell us maybe how SendInput is internally implemented so that we can use it to simulate only part [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-11953","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>Michal Zygmunt wants to create a system where multiple applications can have focus, with different users generating input and directing them at their target applications. Attempting to simulate this by posting input messages didn&#8217;t work. &#8220;Can you tell us maybe how SendInput is internally implemented so that we can use it to simulate only part [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/11953","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=11953"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/11953\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=11953"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=11953"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=11953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}