def METHOD_NAME(self, view, event):
    '''Key pressed event handler, finish editing on Return'''
    # event == None for day selected via double-click
    if (
        not event
        or event.type == Gdk.EventType.KEY_PRESS
        and Gdk.keyval_name(event.keyval) == 'Return'
    ):
        self._done()
        return True