Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable echo and set raw terminal mode via ANSI escape sequence or X11 escape sequence

Is there possibility to disable echo (except ESC[8m which only hides text) programatically in remote terminal? Any equivalent for stty -echo?

Is there also any escape command to enable raw mode (equivalent of stty raw) in remote terminal? Without raw mode getchar works only after ENTER press.

like image 822
18C Avatar asked Oct 18 '22 07:10

18C


1 Answers

Unfortunately, it seems that there is not a way to do this just using escape codes of any kind. You will have to take a look at termios.h. If you need to do this low-level and can't use C, see How do i read single character input from keyboard using nasm (assembly) under ubuntu?, other than that, try searching for "non-canonical terminal input" (Canonical vs. non-canonical terminal input)

like image 191
Adrijaned Avatar answered Oct 28 '22 23:10

Adrijaned