As far I researched, terminfo
/termcap
and ioctl
don't allow to query character at (x,y) position on terminal's screen. This is rather unexpected, because:
- one can read e.g. screen dimensions from terminal (e.g.
tput co
, tput li
),
- one can read input from terminal
– the two mean that communication with terminal is bidirectional. Is there really no way to query a character at given position, like with *inch*
, *in_wch*
curses functions (which work only for curses windows)?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…