The following snippet prints the key pressed. But it doesn't tell me if the i printed an alphabet in capital letters.It doesn't detect the caps lock when i press it,doesn't detect the shift key or any other key like the function keys etc. How do i do that ?
wchar_t buff[10];
BYTE keyState[256] = {0};
KBDLLHOOKSTRUCT * kbhook = (KBDLLHOOKSTRUCT *) lParam;
int result = ToUnicodeEx( kbhook->vkCode,
kbhook->scanCode,
keyState,
buff,
10,
0,
NULL);
wcout << result << endl;