The keyboard thread was causing a deadlock with the ui thread, now the keyboard thread is non-blocking.