code: def event(self, button):
          
          # cancel any pending timer
          if self.timer:
              self.timer.cancel()
          if self.last_button != button:
              if self.last_button:
                  # new button clicked process the one before.
                  self.trigger()
              self.clicks = 1
          else:
              self.clicks += 1
          # do we accept double clicks on this button?
          # if not then just process the click
          button_index = min(button, len(self.callbacks)) - 1
          if not self.callbacks[button_index][1]:
              # set things up correctly for the trigger
              self.clicks = 1
              self.last_button = button
              self.trigger()
          else:
              # set a timeout to trigger the click
              # this will be cancelled if we click again before it runs
              self.last_button = button
              self.timer = Timer(self.click_time, self.trigger)
              self.timer.start()
docs: button has been clicked