69,371
社区成员
发帖
与我相关
我的任务
分享
char up;
up=getchar();
if (up==0)
up=getchar();
#include <windows.h>
#include <conio.h>
void main() {
unsigned short int k;
while (1) {
Sleep(100);
if (_kbhit()) {
k=_getch();
if (0==k) k=_getch()<<8;
cprintf("key 0x%04x pressed.\r\n",k);
}
}
}