Terminal – Get Character at Terminal Cursor Using ANSI Escape Codes

escape-charactersterminal

I know I can move the cursor with the escape codes, and I can also print at the cursor. What I'd like to know is if it is possible to pull the character under the cursor.

I tried searching for such a code, but failed. So I assume it is not possible, but I'd like to ask if there is some way I failed to find.

Best Answer

This is not possible unless you modify your terminal emulator to make it possible; use curses library or equivalent.