// KeyCode - Print values of characters pressed printf("Press Key to see keyboard value; Press ESCAPE to exit\n"); do { key = getch(); printf("key=%04X\n",key) } while( key != '\033' );