The library you are referring to is subscribing to following four hooks:
- WH_KEYBOARD_LL
- WH_KEYBOARD
- WH_MOUSE_LL
- WH_MOUSE
When you subscribe to a hook you give a system a callback to your code, which will be executed according to the rules which differ from hook type to hook type. Also the information the callback will deliver to you must be interpreted differently. These 4 deliver information about mouse positions, key strokes etc.
There are many different types of hooks you can subscribe to. See: Hook Overview
The WH_CALLWNDPROCRET
yo are referring to is one of them. It has different callback invocation behavior and delivers you all messages sent to window. These may include theoretically any of hundreds of possible messages, not only keyboard and mouse messages.
To answer your question the library globalmousekeyhook
can not subscribe to any other hooks than those 4 mentioned above.
Good news is that you can probably reuse code form the library to implement your own subscription.
- You can reuse code to install the hook.
- The signature of your callback will of course be different.
- Then you will get all messages.
- Filter out only those messages you are interested in e.g.
WM_KEYDOWN, WM_KEYUP, WM_SYSKEYDOWN, WM_SYSKEYUP
.
- Interpret the data delivered along with messages. Also here you can reuse some code from the library.
Conclusion
No, the library can not do what you are looking for.
Yes, you can probably achieve that by reusing code from that library.