stty has a full set of *echo settings to turn on or off of certain echoing type. It’s very common for a program not to echo out user key press when it’s not in text input box or some sort. To block the input character echoing, simply:
stty -echo
To turn it back on, just do stty echo. However, this would not block control characters like user interrupt Ctrl+C, to mute those control characters:
stty -ctlecho
# or
stty -echoctl
The ^C is no longer being echoed out, to reverse the effect, with same fashion, stty ctlecho would do just like that.
See stty(1) or info coreutils 'stty invocation' 'Local' for more detail and other echoing types, such as echoe for erase characters.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.