【发布时间】:2021-10-27 22:43:36
【问题描述】:
【问题讨论】:
标签: scripting keyboard keyboard-shortcuts autohotkey hotkeys
【问题讨论】:
标签: scripting keyboard keyboard-shortcuts autohotkey hotkeys
要区分用户击键和“人工”击键,您必须使用键盘挂钩。
这些挂钩通常是自动设置的。 (尽管#InstallKeybdHook 可以手动更改)
但即使可用,它们也并不总是在使用中。要强制它们,您可以在热键定义前使用 #UseHook 或 modifier symbol "$"。
与您的问题相关的示例:
$!Space:: MsgBox, Action configured with hook.
F2:: Send, !{Space} ; This can still trigger the old behavior.
另一种方法是通过Hotkey command 暂时关闭您的热键。
【讨论】: