def METHOD_NAME(self, controlId):
    if controlId == 20:
        # button Valider
        solution = self.getControl(5000).getLabel()
        xbmcgui.Window(10101).setProperty("captcha", str(solution))
        self.close()
        return
    elif controlId == 30:
        # button fermer
        self.close()
        return
    elif controlId == 21:
        # button clavier
        self.getControl(2).setVisible(True)
        kb = xbmc.Keyboard(self.getControl(5000).getLabel(), "", False)
        kb.doModal()
        if kb.isConfirmed():
            self.getControl(5000).setLabel(kb.getText())
            self.getControl(2).setVisible(False)
        else:
            self.getControl(2).setVisible(False)