在 AHK 中正常使用键和作为修饰符
Using keys normally and as modifiers in AHK
我用 AutoHotKey 重新映射了菜单键和其他字母数字键的一些组合,但在这样做时它禁用了菜单键的正常使用。有没有一种方法可以重新映射键的组合,但将其正常使用与 AHK 保持一致。我将把我目前正在使用的代码放在下面。谢谢
AppsKey & m::DllCall("SetCursorPos", "int", 2000, "int", 1440) ; The first number is the X-coordinate and the second is the Y (relative to the screen).
AppsKey & =:: Send {U+2248}
AppsKey & x:: Send {U+00D7}
从 docs that user3419297 mentioned 开始,您可以通过将 AppsKey::AppsKey
放在脚本末尾来解决这个问题。但是,这将导致菜单键仅在您 释放 菜单键后才执行其正常功能,前提是您在此期间没有按下任何其他键(与最初时相反)压下去)。如果此功能更改没有发生,则每次您尝试按住菜单键以触发任何热键时都会触发菜单键的标准功能。
最终剧本
AppsKey & m::DllCall("SetCursorPos", "int", 2000, "int", 1440) ; The first number is the X-coordinate and the second is the Y (relative to the screen).
AppsKey & =:: Send {U+2248}
AppsKey & x:: Send {U+00D7}
AppsKey::AppsKey
我用 AutoHotKey 重新映射了菜单键和其他字母数字键的一些组合,但在这样做时它禁用了菜单键的正常使用。有没有一种方法可以重新映射键的组合,但将其正常使用与 AHK 保持一致。我将把我目前正在使用的代码放在下面。谢谢
AppsKey & m::DllCall("SetCursorPos", "int", 2000, "int", 1440) ; The first number is the X-coordinate and the second is the Y (relative to the screen).
AppsKey & =:: Send {U+2248}
AppsKey & x:: Send {U+00D7}
从 docs that user3419297 mentioned 开始,您可以通过将 AppsKey::AppsKey
放在脚本末尾来解决这个问题。但是,这将导致菜单键仅在您 释放 菜单键后才执行其正常功能,前提是您在此期间没有按下任何其他键(与最初时相反)压下去)。如果此功能更改没有发生,则每次您尝试按住菜单键以触发任何热键时都会触发菜单键的标准功能。
最终剧本
AppsKey & m::DllCall("SetCursorPos", "int", 2000, "int", 1440) ; The first number is the X-coordinate and the second is the Y (relative to the screen).
AppsKey & =:: Send {U+2248}
AppsKey & x:: Send {U+00D7}
AppsKey::AppsKey