def keyPressEvent(self, event):
        key = event.key()

        if key in self.keymap:
            self.keymap[key]()
        else:
            super(EndScreen, self).keyPressEvent(event)
Handle keyboard events
dataset/ETHPy150Open tuturto/pyherc/src/herculeum/ui/gui/endscreen.py/EndScreen.keyPressEvent