2021-02-22 15:17:06 -08:00
|
|
|
#include <stdio.h>
|
|
|
|
#include "getch.h"
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
|
|
|
int key = _getch();
|
2021-02-24 20:46:16 -08:00
|
|
|
|
|
|
|
printf("Key %d\n", key);
|
2021-02-22 15:17:06 -08:00
|
|
|
|
|
|
|
if (key == 0 || key == 224) {
|
|
|
|
key = _getch();
|
|
|
|
printf("Special Key : %d\n", key);
|
|
|
|
}
|
2021-03-01 09:37:48 -08:00
|
|
|
|
|
|
|
do {
|
|
|
|
key = _getch();
|
|
|
|
printf("Key : %d\n", key);
|
|
|
|
} while(key != 113);
|
|
|
|
|
|
|
|
_ungetch('A');
|
|
|
|
|
|
|
|
int res = cinPeek();
|
|
|
|
int getch = _getch();
|
|
|
|
|
|
|
|
printf("%c : %c\n\r", res, getch);
|
|
|
|
|
2021-02-22 15:17:06 -08:00
|
|
|
}
|