Systemwide Hotkeys
Posted: Sat Oct 25, 2014 2:09 pm
Hi All,
As I've commented in another post, I'm working in an utility that sits in system tray.
The purpose of this utility is to capture hotkeys (systemwide) and paste a specific code number according key pressed.
It must work with focused edit control in any application.
To implement this, the hotkeys must be trapped even when our HMG app, is not the active one (remember, we are waiting in the system tray).
This situation remembers me a problem at the start of MiniGUI library development.
The "problem" was that hotkeys were available systemwide
Then, to solve this, I've filtered the WM_HOTKEY message, to ignore hotkeys when our app is not active.
So, the only thing required to have (optional) systemwide hotkeys is to create a publc flag (living at _HMG_SYSDATA) and according to it, activate or deactivate WM_HOTKEY filter.
A very easy to accomplish wish
Thanks for your attention.
As I've commented in another post, I'm working in an utility that sits in system tray.
The purpose of this utility is to capture hotkeys (systemwide) and paste a specific code number according key pressed.
It must work with focused edit control in any application.
To implement this, the hotkeys must be trapped even when our HMG app, is not the active one (remember, we are waiting in the system tray).
This situation remembers me a problem at the start of MiniGUI library development.
The "problem" was that hotkeys were available systemwide

Then, to solve this, I've filtered the WM_HOTKEY message, to ignore hotkeys when our app is not active.
So, the only thing required to have (optional) systemwide hotkeys is to create a publc flag (living at _HMG_SYSDATA) and according to it, activate or deactivate WM_HOTKEY filter.
A very easy to accomplish wish

Thanks for your attention.