code: def show_as_root_until_keypress(self, w, key, afterwards=None):
          
          self.mainloop.widget = w
          self._unlock_key = key
          self._unlock_callback = afterwards
          self._locked = True
docs: Replaces root widget by given :class:`urwid.Widget` and makes the UI
          ignore all further commands apart from cursor movement.
          If later on `key` is pressed, the old root widget is reset, callable
          `afterwards` is called and normal behaviour is resumed.