use new EMCurses keyboard handler callback

 * should improve performance on EMCurses/Emscripten,
   since no polling for key events is necessary anymore