I need to get a char with ncurses, but when I get the char, I don't want it printed to the screen. Is there a way to do this?
Assuming you're using C, you can use noecho();.
The following is a relevant excerpt from the manual pages.
The
echoandnoechoroutines control whether characters typed by the user are echoed bygetchas they are typed. Echoing by the tty driver is always disabled, but initiallygetchis in echo mode, so characters typed are echoed. Authors of most interactive programs prefer to do their own echoing in a controlled area of the screen, or not to echo at all, so they disable echoing by callingnoecho.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With