Try LazyCat's implementation of getch() in catacurse.cpp