def keyPressEvent(self, event):
        """
        Process keyboard events
        """
        if event.key() in self.konami[self.konami_index]:
            self.konami_index = self.konami_index + 1
        else:
            self.konami_index = 0

        if self.konami_index == len(self.konami):
            self.application.enable_cheat()

        if event.key() in self.config.action_a:
            self.__generate_character()
            self.animation_adapter.glyphs.clear()
            self.accept()
        elif event.key() in self.config.move_right:
            self.selected_index = self.selected_index + 1
            if self.selected_index >= len(self.class_names):
                self.selected_index = 0
            self._show_character(
                    self.class_config[self.class_names[self.selected_index]])
        elif event.key() in self.config.move_left:
            self.selected_index = self.selected_index - 1
            if self.selected_index < 0:
                self.selected_index = len(self.class_names) - 1
            self._show_character(
                    self.class_config[self.class_names[self.selected_index]])
        else:
            super().keyPressEvent(event)
dataset/ETHPy150Open tuturto/pyherc/src/herculeum/ui/gui/startgame.py/StartGameWidget.keyPressEvent/original