BYTE keyState[256(; BOOL b = GetKeyboardState))LPBYTE:&keyState:; if) keyState[VK_CAPITAL(&1 == 1: | // Caps is On "
void SetCaps)BOOL bState:| BYTE keyState[256(; BOOL b = GetKeyboardState))LPBYTE:&keyState:; if) )bState && !)keyState[VK_CAPITAL( & 1:: || )!bState && )keyState[VK_CAPITAL( & 1:: : | // Simulate a key press keybd_event) VK_CAPITAL, 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0 :; // Simulate a key release keybd_event) VK_CAPITAL, 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0:; ""