6

I know that Konsole supports an escape code like "\<Esc>]50;CursorShape=0\x7" that will change the cursor shape. I was wondering if any other terminal emulators support changing the cursor shape via an escape code?

1 Answer 1

9

The Linux VGA/framebuffer consoles use the Esc[?...c code.

xterm supports the VT520 sequence DECSCUSR Esc[... q since patch 282.

6
  • CL: Do you know of anything else besides xterm supporting the VT520 escape codes? Commented Sep 30, 2012 at 14:42
  • One would think that other terminals would want to be compatible with xterm, but I haven't found any that document this.
    – CL.
    Commented Sep 30, 2012 at 15:14
  • github.com/gnachman/iTerm2/pull/92 mentions that MinTTY/TeraTerm/RLogin support this too. Commented Jan 30, 2013 at 21:54
  • 3
    I'd give my left nut for Terminal.app to support this on OS X. Commented Mar 10, 2013 at 5:07
  • 1
    Just in case this helps others: After compiling/using the sanos text editor in a remote console (which I was accessing over SSH), the cursor was changed to the block shape (). Following this answer, I tried to restore the vertical line cursor (|, called "bar" in the xterm documentation linked above) with both printf '\033[?5c' and printf '\033[5 q'. The latter worked.
    – waldyrious
    Commented Feb 21, 2018 at 9:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .