keyboard: keyboard inputs in separate thread