1

It's possible, with ANSI codes, to modify the cursor shape (block, underscore or line) and whether it's blinking or not.

My program is doing just that. But, is it possible to get the cursor style so it can be restored later (when my program exits)?

One can get the cursor position and even mouse position with ANSI codes, but it seams to me that we can only set the cursor style and not retrieve it or even reset it to an older state.

Cl00e9ment
  • 111
  • 2
  • See https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Device-Control-functions (DECRQSS request for DECSCUSR) for xterm or compatible. – Stéphane Chazelas Apr 01 '22 at 17:58
  • Thank you a lot for your answer. Unfortunately, after testing it, it doesn't work in a lot of terminals and I'm seeking something more cross-compatible. – Cl00e9ment Apr 02 '22 at 20:54

0 Answers0