I did checkout your repository and played around a bit with compiling vim with different options, had some trouble getting your MUI-GUI-code to compile (complained about _ParseIFF_v1 or something which I couldn't find any reference to anywhere :/) so I simply compiled it without GUI for now. Well to the point, I actually managed to get the arrowkeys-working in a normal shell, thing is - I'm not exactly sure what I've done :)
Gonna make some more tests and report back here with my findings.
It still can't detect the size of the window though
I just realized one thing, VIM can detect the size of the shell if you use the standard "Shell" instead of the "MUI Shell". It still cannot detect if you resize the window after startup though.