I would like to have a boolean event toggle when a key is pressed. Specifically, the \'s\' key. I have been pointed to the function GetKeyState(), which supposedly works und
I use a global variable bool altgr
Example:
void Editor::HandleKey(char car) {
bool shift = false;
//bool altgr = false;
bool printable = false;
if (car == 27) SendMessage(hwnd, WM_DESTROY, 0, 0);
if ((GetKeyState(VK_CAPITAL) & 0x0001) == 1) shift = true;
if ((GetKeyState(VK_SHIFT) & 0x8000) == 0x8000) shift = true;
// if(GetKeyState(VK_RMENU) & 0x80000000 == 0x80000000) altgr = true;
if (car == 18) altgr = true;