'Handle Key_Up/Key_Down while debugging.'

def _event_filter_console_keypress(self, event):

    key = event.key()
    if self._reading:
        self._control.current_prompt_pos = self._prompt_pos
        if (key == Qt.Key_Up):
            self._control.browse_history(backward=True)
            return True
        elif (key == Qt.Key_Down):
            self._control.browse_history(backward=False)
            return True
        else:
            return super(DebuggingWidget, self)._event_filter_console_keypress(event)
    else:
        return super(DebuggingWidget, self)._event_filter_console_keypress(event)
