I'm closing this bug. The problem was lack of termcap support for keypresses. The current ae package implements termcap support for keypresses, and is capable of terminfo support. I'll release ae compiled for terminfo support when a shared ncurses library is released.
Note: both /etc/termcap and /usr/lib/terminfo terminal definition files still have problem with missing capabilities definitions in the linux and xterm entries, and xterms seem to produce strange keypress sequences for some keys.