如何将 F12 注册为热键
How to register F12 as a hotkey
根据 this article:
The F12 key is reserved for use by the debugger at all times, so it
should not be registered as a hot key. Even when you are not debugging
an application, F12 is reserved in case a kernel-mode debugger or a
just-in-time debugger is resident.
但是,由于 AutoHotkey 可以与 F12 配合使用,因此有一种解决方法。有人知道怎么做吗?
在看了一小段源代码后,我仍然不确定 AutoHotkey 是如何做到的。但是,我开始以不同的方式思考问题。我没有像对所有其他键所做的那样尝试使用 RegisterHotKey
,而是决定尝试收听所有键。而且,瞧,使用 a low level keyboard hook from Stephen Toub,我现在至少可以看到 F12。我将使用 RegisterHotKey 进行其他所有操作,但会通过此挂钩单独监听 F12。
您可以将其映射到其他内容,例如:F12::Send ^c
编辑:使用像 AutoHotKey 这样的第三方应用程序。
根据 this article:
The F12 key is reserved for use by the debugger at all times, so it should not be registered as a hot key. Even when you are not debugging an application, F12 is reserved in case a kernel-mode debugger or a just-in-time debugger is resident.
但是,由于 AutoHotkey 可以与 F12 配合使用,因此有一种解决方法。有人知道怎么做吗?
在看了一小段源代码后,我仍然不确定 AutoHotkey 是如何做到的。但是,我开始以不同的方式思考问题。我没有像对所有其他键所做的那样尝试使用 RegisterHotKey
,而是决定尝试收听所有键。而且,瞧,使用 a low level keyboard hook from Stephen Toub,我现在至少可以看到 F12。我将使用 RegisterHotKey 进行其他所有操作,但会通过此挂钩单独监听 F12。
您可以将其映射到其他内容,例如:F12::Send ^c
编辑:使用像 AutoHotKey 这样的第三方应用程序。