def METHOD_NAME(self, key_event: KeyEventType) -> bool:
    ' Override in sub-class if you want to handle these key events yourself '
    if key_event.matches('ctrl+c'):
        self.on_interrupt()
        return True
    if key_event.matches('ctrl+d'):
        self.on_eot()
        return True
    return False