<bdo id='YQecQ'></bdo><ul id='YQecQ'></ul>
    <tfoot id='YQecQ'></tfoot>

      <i id='YQecQ'><tr id='YQecQ'><dt id='YQecQ'><q id='YQecQ'><span id='YQecQ'><b id='YQecQ'><form id='YQecQ'><ins id='YQecQ'></ins><ul id='YQecQ'></ul><sub id='YQecQ'></sub></form><legend id='YQecQ'></legend><bdo id='YQecQ'><pre id='YQecQ'><center id='YQecQ'></center></pre></bdo></b><th id='YQecQ'></th></span></q></dt></tr></i><div id='YQecQ'><tfoot id='YQecQ'></tfoot><dl id='YQecQ'><fieldset id='YQecQ'></fieldset></dl></div>
        <legend id='YQecQ'><style id='YQecQ'><dir id='YQecQ'><q id='YQecQ'></q></dir></style></legend>

        <small id='YQecQ'></small><noframes id='YQecQ'>

      1. 检测模拟键盘/鼠标输入

        时间:2023-08-01

            <tfoot id='DC7sa'></tfoot>

                  <bdo id='DC7sa'></bdo><ul id='DC7sa'></ul>
                    <tbody id='DC7sa'></tbody>
                  <legend id='DC7sa'><style id='DC7sa'><dir id='DC7sa'><q id='DC7sa'></q></dir></style></legend>
                  <i id='DC7sa'><tr id='DC7sa'><dt id='DC7sa'><q id='DC7sa'><span id='DC7sa'><b id='DC7sa'><form id='DC7sa'><ins id='DC7sa'></ins><ul id='DC7sa'></ul><sub id='DC7sa'></sub></form><legend id='DC7sa'></legend><bdo id='DC7sa'><pre id='DC7sa'><center id='DC7sa'></center></pre></bdo></b><th id='DC7sa'></th></span></q></dt></tr></i><div id='DC7sa'><tfoot id='DC7sa'></tfoot><dl id='DC7sa'><fieldset id='DC7sa'></fieldset></dl></div>

                  <small id='DC7sa'></small><noframes id='DC7sa'>

                • 本文介绍了检测模拟键盘/鼠标输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  有没有办法检测 Windows 上的模拟键盘/鼠标输入.例如,用户在他的键盘上输入一些东西,而不是 sendKeys/PostMessage/屏幕键盘.有没有办法区分这两者?

                  Is there a way to detect simulated keyboard/mouse input on Windows. For example, a user types something on his keyboard vs sendKeys/PostMessage/On-screen keyboard. Is there a way that I can distinguish between the two?

                  也许一个例子会有所帮助.我正在制作游戏并想区分真实输入与 WinAPI 合成键盘/鼠标消息.

                  Perhaps an example would help. I am making a game and want to distinguish between real input vs WinAPI synthesizing keyboard/mouse messages.

                  推荐答案

                  我可能错了,但屏幕键盘(和其他模拟用户输入的应用程序)很可能使用 SendInput API:

                  I might be wrong, but the on-screen keyboard (and other applications that simulate user input) most probably uses the SendInput API:

                  SendInput 在输入堆栈的底层运行.它只是键盘和鼠标驱动程序用来告诉窗口管理器用户生成输入的相同输入机制的后门.来源:http://blogs.msdn.com/b/oldnewthing/archive/2010/12/21/10107494.aspx

                  SendInput 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. Source: http://blogs.msdn.com/b/oldnewthing/archive/2010/12/21/10107494.aspx

                  因此可能无法判断输入是否来自真实"键盘.

                  So there is probably no way to tell whether the input is coming from a "real" keyboard or not.

                  这篇关于检测模拟键盘/鼠标输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:DoEvents 等效于 C++? 下一篇:可执行文件是否可以要求管理员权限?(Windows 7的

                  相关文章

                  最新文章

                    <bdo id='pnAwN'></bdo><ul id='pnAwN'></ul>

                  1. <i id='pnAwN'><tr id='pnAwN'><dt id='pnAwN'><q id='pnAwN'><span id='pnAwN'><b id='pnAwN'><form id='pnAwN'><ins id='pnAwN'></ins><ul id='pnAwN'></ul><sub id='pnAwN'></sub></form><legend id='pnAwN'></legend><bdo id='pnAwN'><pre id='pnAwN'><center id='pnAwN'></center></pre></bdo></b><th id='pnAwN'></th></span></q></dt></tr></i><div id='pnAwN'><tfoot id='pnAwN'></tfoot><dl id='pnAwN'><fieldset id='pnAwN'></fieldset></dl></div>
                    <legend id='pnAwN'><style id='pnAwN'><dir id='pnAwN'><q id='pnAwN'></q></dir></style></legend>
                  2. <small id='pnAwN'></small><noframes id='pnAwN'>

                    <tfoot id='pnAwN'></tfoot>