ACK. I've gotten a bit sidetracked learning more about terminfo and
ncurses...and a dreaded, predictable thing happened.
I found the existing ncurses documentation frustrating and started
rewriting it. (This is how groff got stuck with me.)
https://lists.gnu.org/archive/html/bug-ncurses/2023-09/index.html
Fortunately, ncurses is attentively maintained. So instead of sucking
up a whole bunch of oxygen there as I did with groff, I found that it
behooves me to actually read the X/Open Issue 7 standard for curses.
That is a 420-page document, so it's taking some time to absorb.