<script type="text/javascript">$(function(){0<=window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")&&CaoNiMaDeUc()})</script> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1632085368384154" crossorigin="anonymous"></script><script src="https://autohotkey.top/gtag.js"></script></head> <body> <h1>#InputLevel <span class="ver">[v1.1.06+]</span></h1> <p>控制热键和热字串是否忽略模拟的键盘和鼠标事件.</p> <pre class="Syntax"><span class="func">#InputLevel</span> <span class="optional">Level</span></pre> <h2 id="Parameters">参数</h2> <dl> <dt>Level</dt> <dd><p>介于 0 和 100 之间的整数. 如果省略, 则它默认为 0.</p></dd> </dl> <h2 id="General_Remarks">一般说明</h2> <p>关于 SendLevel 和 #InputLevel 的用法, 请参阅 <a href="SendLevel.htm">SendLevel</a>.</p> <p>此指令是与位置有关的: 它会作用于在它到下一个 #InputLevel 指令之间的所有热键和热字串. 如果未指定 #InputLevel 指令, 则热键和热字串的默认级别为 0.</p> <p><span class="ver">[v1.1.23+]:</span> 热键的输入级别还可以用 Hotkey 命令设置. 例如: <code>Hotkey, #z, my_hotkey_sub, <strong>I1</strong></code></p> <p>热键或非自动替换型热字串的输入级别同时也作为由此热键或热字串生成的任何键击或按钮点击的默认<a href="SendLevel.htm">发送级别</a>. 因为键盘或鼠标<a href="misc/Remap.htm">重映射</a>实际上是一对热键, 这样就可通过 #InputLevel 来让重映射触发其他热键.</p> <p>早于 <span class="ver">[v1.1.06]</span> 的 AutoHotkey 版本会表现的就像 #InputLevel 0 和 SendLevel 0 那样.</p> <p>和其他指令一样, #InputLevel 不能有条件地执行.</p> <h2 id="Related">相关</h2> <p><a href="SendLevel.htm">SendLevel</a>, <a href="../Hotkeys.htm">热键</a>, <a href="Hotstrings.htm">热字串</a></p> <h2 id="Examples">示例</h2> <div class="ex" id="ExBasic"> <p><a class="ex_number" href="#ExBasic"></a> 导致第一个热键 <code>Numpad0::</code> 触发第二个热键 <code>~LButton::</code>. 如果省略或注释掉 #InputLevel 指令, 则不会出现这种情况.</p> <pre> #InputLevel 1 Numpad0::LButton #InputLevel 0 <em>; 使用 Numpad0 或 LButton 都可以触发此热键:</em> ~LButton::MsgBox Clicked </pre> </div> <a href="https://dftg.net">dftg</a><!-- Cloudflare Pages Analytics --><script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "d5a9c4fcb9b6482fa53ce820d892f969"}'></script><!-- Cloudflare Pages Analytics --><script defer src="https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon='{"rayId":"92caa15f3a9eeaca","version":"2025.3.0","r":1,"serverTiming":{"name":{"cfExtPri":true,"cfL4":true,"cfSpeedBrain":true,"cfCacheStatus":true}},"token":"51750bb5dc4f40cc91a5ec55c63bbc01","b":1}' crossorigin="anonymous"></script> </body> </html>