标准库函数 - getkey

原型:extern int getkey(void);

用法:#include <system.h>

功能:读键

说明:功能同getchar

举例:


      // getkey.c
      
      #include <system.h>

      main()
      {
        int c;
        
        clrscr();
        printf("Press key...");
        while((c=getkey())!='Q')
        {
          clrscr();
          printf("key: %c\nvalue: %x",c,c);
        }
      }
      
  
相关函数:getch,getchar,kbhit