本文介绍了全局热键发布(keyup)? (WIN32 API)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法注意到注册了 RegisterHotKey
?的热键按钮的发布?
Is there a way to notice the release of a hot-key button registered with RegisterHotKey
?
I每次按下热键时都会收到 WM_HOTKEY
消息,但我需要知道密钥何时被释放
I get a WM_HOTKEY
message every time I press the hot-key but I need to know when the key was released
推荐答案
该特定操作没有具体的通知。你必须写一个DLL,通过 SetWindowsHookEx()
实现一个全局键盘钩子,然后你会收到单独的按键上下通知,并可以匹配到你的 WM_HOTKEY
根据需要发送通知。
There is no specific notification for that specific action. You will have to write a DLL that implements a global keyboard hook via SetWindowsHookEx()
, then you will receive individual keypress up/down notifications and can match them up to your WM_HOTKEY
notifications as needed.
这篇关于全局热键发布(keyup)? (WIN32 API)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!