There's about 7,284 different ways to interpret the definition of a VT100/VT220/ANSI termianl, and no two programmers ever pick the same interpretation. The termcap used to compile the terminfo files for Linux has a lot of errors and omissions as well.
For this reason I use KoalaTerm for emulation on Windows workstations. It costs $35/pop, but it gives me the flexibility I need to get the function keys to work, and once it's set up it stays that way.
I always install my own terminfo file to go with it too. Remember, Linux uses SVr4 terminfo, so modifying the termcap does nothing until you compile it into a terminfo definition and put it in the right directory.
The other way is Wyse60, but that means expensive terminal emulation programs. American small and medium business has traditionally run 100% on Wyse60, but programmers of low cost emulation are uninterested - Wyse60 isn't used in the universities.
I've talked to several publishers of VT100/200 emulation and they are all completely, totally, 220% uninterested in serving customer needs. All they want to do is produce yet another "BEST" VT220 emulator, and it'll it'll have a different interpretation of how a VT220 works than any of the others.