def onAction( self, action ): button_key = self.control_action.get( action.getButtonCode(), 'n/a' ) actionID = action.getId() try: focusid = self.getFocusId() except: focusid = 0 if ( button_key == 'Keyboard ESC Button' or button_key == 'Back Button' or button_key == 'Remote Menu Button' ): self.close() elif ( button_key == 'Keyboard Menu Button' or button_key == 'White Button' or button_key == 'Remote Title' ): if (focusid != 1): self.launchinfo(focusid)