'The user pressed Return.'

def _key_enter(self):

    textbuffer = self.textbuffer
    cursor_pos = textbuffer.get_property('cursor-position')
    iter_end = textbuffer.get_end_iter()
    if (cursor_pos != iter_end.get_offset()):
        return True
    textbuffer.insert(iter_end, '\n')
    if (not self.user_started):
        self.user_started = textbuffer.create_mark('user-input', iter_end, True)
    iter_start = textbuffer.get_iter_at_mark(self.user_started)
    text = textbuffer.get_text(iter_start, iter_end)
    self.user_started = None
    text = text.strip()
    if text:
        self.all_lines.append(text)
        self._proc(text)
    else:
        self._prompt()
    self.historyCount = len(self.all_lines)
    return True
