+ modify _nc_keypad() to make it switch temporarily as needed to the
screen which must be updated.
+ wrap cur_term variable to help make _nc_keymap() thread-safe, and
always set the screen's copy of this variable in set_curterm().
+ restore curs_set() state after endwin()/refresh() (report/patch
Miroslav Lichvar)