bool is_key_pressed(KeyScancode scancode) { int vk = scancode_to_win32vk(scancode); if (vk) return (GetAsyncKeyState(vk) & 0x8000 ? true: false); else return false; }
int win_get_unicode_from_scancode(KeyScancode scancode) { int vk = scancode_to_win32vk(scancode); if (vk && (GetAsyncKeyState(vk) & 0x8000 ? true: false)) { VkToUnicode tu; if (tu) { tu.toUnicode(vk, 0); if (tu.size() > 0) return tu[0]; } } return 0; }