📅  最后修改于: 2022-03-11 14:44:45.880000             🧑  作者: Mango
HWND hwnd = GetConsoleWindow();
if (GetForegroundWindow() == hwnd){
if((GetKeyState(VK_SPACE) & 0x8000) != 0)){
// DO YOUR STUFF HERE
}
}