How to change the keyboard state??
Posted on 1997-12-13
I need the code to change the NumLock Key state by clicking on a button of my application
Have tried using the following code but it does not seem to work
keybd_event(VK_NUMLOCK, 0, 0, 0);
keybd_event(VK_NUMLOCK, 0, KEYEVENTF_KEYUP, 0);
The above code works when substituted with VK_CAPITAL or VK_INSERT but not VK_NUMLOCK. Anyone knows why?
By the way, I took the code from another person's answer
(Ermac I think...) and he had the same problem as me