Quote:
Originally Posted by slavik262
WH_KEYBOARD_LL passes a pointer to a struct containing they key data (such as key code, etc.) as it's lParam, but i have found that changing the data in the struct does not affect the output (even If I change the keycode the key remains the same). Can't I change the data in the message using the hook?
|
You should be able to do this by modifying the vkCode in the lParam struct before calling CallNextHookEx. This function passes on the key on to the next handler in the hook chain, so passing a modified lParam will mean that all handlers that were registered before your (including the default windows handler) will see the modified value. At least that's how it works in theory.
Let me know if that works.
--Ryan
P.S. I'm not sure why WH_KEYBOARD_LL works and WH_KEYBOARD doesn't. I think I remember running into the same issue with mine. Maybe posting to the MSDN forums would shed a bit more light on the subject.
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor