Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <termios.h>
- #include <unistd.h>
- int main(void){
- static struct termios tc, newx;
- tcgetattr( STDIN_FILENO, &tc);
- newx = tc;
- newx.c_lflag &= ~(ICANON | ECHO);
- tcsetattr( STDIN_FILENO, TCSANOW, &newx);
- while(getchar() == 'a')
- printf("teste");
- tcsetattr( STDIN_FILENO, TCSANOW, &tc);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement