擅长:python、mysql、java
<p>正如<a href="https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getasynckeystate" rel="nofollow noreferrer">documentation</a>所述:</p>
<blockquote>
<p>If the most significant bit is set, the key is down, and if the least significant bit is set, the key was pressed after the previous call to <code>GetAsyncKeyState</code>.</p>
</blockquote>
<p>-32768为0x8000,表示高位已设置。与你描述的“我用鼠标左键运行它”相符。您按下按钮,这就是<code>GetAsyncKeyState()</code>报告的内容。无论你读到什么,说“GetAsyncKeyState将返回1如果按键或0如果没有”是错误的。你知道吗</p>