Register | Login | |||||
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
| |
0 users currently in Programming. |
User | Post |
wboy Posts: 13/15 |
Take a look at:
http://geocities.com/adamruggles/downloads/HookSample.zip The example itself is in VB6 (references a custom hook dll), but it does include the hook source with it which is written in C++. Quick test of the apps shows it does return {Shift}{Num 0} and not {Insert} so it should allow you to work out how its being done. |
sloat Posts: 17/20 |
Originally posted by HyperMackerel My mistake. I was just inspecting it and it seems bit 24 of the lParam will be set if you're using the regular insert key and cleared if you do shift+numpad0. But it still registers as an insert keystroke. |
MisterJones Posts: 54/125 |
Originally posted by HyperMackerel How about a trick checking if shift is being pressed. You can check modifiers, can't you? I'ts been a while since I have done anything win32. |
HyperHacker Posts: 2647/5072 |
That's not what I meant. When my keyboard hook is called it's being told that Insert is pressed. I want it to still be told that Num0 is pressed. |
sloat Posts: 16/20 |
From what I can remember, they Keyboard Hook can't be used to modify input. The only way I was ever able to modify keyboard data or block the keystroke message was with a WH_GETMESSAGE hook. |
HyperHacker Posts: 2640/5072 |
I set up a keyboard hook to detect when keys are pressed, but Windows isn't reporting the exact status of the keys. If I press Shift+Numpad 0, it reports it as being Insert that's pressed. Can I make it still report Numpad 0 somehow? |