def on_click(self, event):
        """
        Switch the displayed module or pass the event on to the active module
        """
        button = event["button"]
        index = event["index"]

        # if click_mode is button, prevent the contents from changing when
        # if the events are not registered on the button index. this allow
        # the users to interact with the modules via scrolling or clicking
        # without group getting in the way of the contents.
        if self.click_mode == "button":
            if not self.py3.is_my_event(event) or index != "button":
                return

        self.cycle = self.cycle_timeout
        self.cycle_time = time.monotonic() + self.cycle

        if button == self.button_next:
            if self.open:
                self._change_active(+1)
        elif button == self.button_prev:
            if self.open:
                self._change_active(-1)
        elif button == self.button_toggle:
            if index == "button":
                self.open = not self.open

        Switch the displayed module or pass the event on to the active module
        
py3status/modules/group.py