#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0) void check(char c) {//检测某个按键是否按下 if (KEY_DOWN(c)) { printf("%c", c); } }