def prompt_input(self, prompt, key=False):
        """
        Display a text prompt at the bottom of the screen.

        Params:
            prompt (string): Text prompt that will be displayed
            key (bool): If true, grab a single keystroke instead of a full
                        string. This can be faster than pressing enter for
                        single key prompts (e.g. y/n?)
        """

        n_rows, n_cols = self.stdscr.getmaxyx()
        v_offset, h_offset = self.stdscr.getbegyx()
        ch, attr = str(' '), self.attr('Prompt')
        prompt = self.clean(prompt, n_cols - 1)

        # Create a new window to draw the text at the bottom of the screen,
        # so we can erase it when we're done.
        s_row = v_offset + n_rows - 1
        s_col = h_offset
        prompt_win = curses.newwin(1, len(prompt) + 1, s_row, s_col)
        prompt_win.bkgd(ch, attr)
        self.add_line(prompt_win, prompt)
        prompt_win.refresh()

        # Create a separate window for text input
        s_col = h_offset + len(prompt)
        input_win = curses.newwin(1, n_cols - len(prompt), s_row, s_col)
        input_win.bkgd(ch, attr)
        input_win.refresh()

        if key:
            self.curs_set(1)
            ch = self.getch()
            # We can't convert the character to unicode, because it may return
            # Invalid values for keys that don't map to unicode characters,
            # e.g. F1
            text = ch if ch != self.ESCAPE else None
            self.curs_set(0)
        else:
            text = self.text_input(input_win)

        prompt_win.clear()
        input_win.clear()
        del prompt_win
        del input_win
        self.stdscr.touchwin()
        self.stdscr.refresh()

        return text
Display a text prompt at the bottom of the screen.

        Params:
            prompt (string): Text prompt that will be displayed
            key (bool): If true, grab a single keystroke instead of a full
                        string. This can be faster than pressing enter for
                        single key prompts (e.g. y/n?)