#include#include main() { char c; initscr(); savetty(); raw(); noecho(); if (ioctl(0, KDSKBMODE, K_CODE) < 0) perror(0); do { c = getchar(); if ( c > 0) printf("%d\n\r", c); } while (c != 1); if (ioctl(0, KDSKBMODE, K_XLATE) < 0) perror(0); resetty(); exit(); }