Re: keyboard
Your post is confusing. First you say you want to switch the state of the cap locks key, then you start asking questions about GetKeyState(). Which is a function that gets that status of a key.
To answer your question about the low bit / high bit. The high bit is -> (0x10000000) and the low bit is -> (0x00000001). Basically you are going to want to 'And' (&) your return values with one of those values depending on what you are trying to do. That is how you check the status of a key, however using GetAsyncKeyState() might be a better choice, search on MSDN for more information.
Now, to actual change the key state, you need to use some different functions. You will need to use SetKeyboardState(), SendInput(), or keybd_event(). These functions can be used to toggle the status of the cap locks key, hence turning it on or off. Use msdn to learn the syntax of these commands.
Hopefully that helps out.
|