def keypress(self, size, key): if key == "backspace": self.delete_char() else: return urwid.Edit.keypress(self, size, key) return None