Register | Login | |||||
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
| |
0 users currently in Programming. |
Acmlm's Board - I3 Archive - Programming - Windows keyboard hook; how to get true numpad status? | New poll | | |
Add to favorites | Next newer thread | Next older thread |
User | Post | ||
HyperHacker Star Mario Finally being paid to code in VB! If only I still enjoyed that. <_< Wii #7182 6487 4198 1828 Since: 11-18-05 From: Canada, w00t! My computer's specs, if anyone gives a damn. STOP TRUNCATING THIS >8^( Last post: 6432 days Last view: 6432 days |
| ||
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? | |||
sloat Since: 11-18-05 From: Delaware, US Last post: 6535 days Last view: 6535 days |
| ||
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 Star Mario Finally being paid to code in VB! If only I still enjoyed that. <_< Wii #7182 6487 4198 1828 Since: 11-18-05 From: Canada, w00t! My computer's specs, if anyone gives a damn. STOP TRUNCATING THIS >8^( Last post: 6432 days Last view: 6432 days |
| ||
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. | |||
MisterJones Tooky Since: 12-08-05 From: Mexico Last post: 6521 days Last view: 6457 days |
| ||
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. |
|||
sloat Since: 11-18-05 From: Delaware, US Last post: 6535 days Last view: 6535 days |
| ||
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. |
|||
wboy Since: 01-05-06 Last post: 6615 days Last view: 6615 days |
| ||
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. (edited by wboy on 07-21-06 09:43 PM) (edited by wboy on 07-21-06 09:56 PM) |
Add to favorites | Next newer thread | Next older thread |
Acmlm's Board - I3 Archive - Programming - Windows keyboard hook; how to get true numpad status? | | |