I think I've won the ancient struggle to get a decent terminal
application for Windows. Putty - can do ssh, and ALL THE KEYS WORK
and ALL THE SCREEN ATTRIBUTES ARE CORRECT. Yea!
It wants to identify itself to Linux as an xterm - which is good.
In that mode, all the keys are handled correctly. Make the following
trivial change to your bashrc.local:
if TERM=xterm; then
export TERM=xterm-color
fi
Then all the ncurses attributes also work correctly.
This is nirvana. I don't think I've ever had EVERYTHING working
before!