I'm working on automation tools for an ERP program running on SCO Unix.
See my questions on Expect:
Where can I find (either locally or on the web) resources for understanding what control characters are used in a session, and more specifically, determining a field location on the screen during an interaction with the ERP program?
The specific control characters for a given terminal type are stored in the terminfo
database. curses reads the value of $TERM
when initializing and uses it to find and extract the relevant sequences for the various terminal operations.