def METHOD_NAME(self, event):
    # Do the key handling for this Frame.
    if isinstance(event, KeyboardEvent):
        if event.key_code in [ord('q'), ord('Q'), Screen.ctrl("c")]:
            raise StopApplication("User quit")
        elif event.key_code in [ord("r"), ord("R")]:
            self._reverse = not self._reverse
        elif event.key_code == ord("<"):
            self._sort = max(0, self._sort - 1)
        elif event.key_code == ord(">"):
            self._sort = min(7, self._sort + 1)
        # Force a refresh for improved responsiveness
        self._last_frame = 0
    # Now pass on to lower levels for normal handling of the event.
    return super(DemoFrame, self).METHOD_NAME(event)