I have an open socket to a remote terminal. Using the answer to "Force telnet client into character mode" I was able to put that terminal into character mode.
My question is, how do I hide the cursor in the remote terminal using this method?
To expand upon mjh2007's answer, the following c/c++ code will implement sending the escape codes to the terminal, and is slightly more readable than raw hex numbers.
void showCursor(bool show) const {
#define CSI "\e["
if (show) {
fputs(CSI "?25h", stdout);
}
else {
fputs(CSI "?25l", stdout);
}
#undef CSI
}
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