mirror of
https://github.com/n05la3/cmdtypist
synced 2024-11-15 12:13:09 +00:00
debugging getche()
This commit is contained in:
parent
a89100c839
commit
ccce0633c4
@ -198,7 +198,7 @@ extern int getche(void)
|
|||||||
newattr = oldattr;
|
newattr = oldattr;
|
||||||
newattr.c_lflag &= ~( ICANON | ECHO);//shell out to kill echo
|
newattr.c_lflag &= ~( ICANON | ECHO);//shell out to kill echo
|
||||||
tcsetattr( STDIN_FILENO, TCSANOW, &newattr );
|
tcsetattr( STDIN_FILENO, TCSANOW, &newattr );
|
||||||
system("stty echo");//shell out to kill echo
|
system("stty -echo");//shell out to kill echo
|
||||||
ch = getchar();
|
ch = getchar();
|
||||||
tcsetattr( STDIN_FILENO, TCSANOW, &oldattr );
|
tcsetattr( STDIN_FILENO, TCSANOW, &oldattr );
|
||||||
return ch;
|
return ch;
|
||||||
|
Loading…
Reference in New Issue
Block a user