Saturday, December 12, 2015

Detect Function Keys in C Program

Program #22

Description:
To get the Function key values using getch()


void main(){
  char inputKey;
 
/* Clear the Screen */
  clrscr();

  /* Detect Function Keys in C Program */
  while ( (inputKey = getch()) != '\r'){
    printf("%c:%d\n", inputKey, inputKey);
  }
}

 

No comments:

Post a Comment

Popular Posts