ui/ncurses: Treat left/right arrow keys properly