def on_click(self, button, **kwargs):
actions = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>']<EOL>try:<EOL><INDENT>action = actions[button - <NUM_LIT:1>]<EOL><DEDENT>except (TypeError, IndexError):<EOL><INDENT>self.__log_button_event(button, None, None, "<STR_LIT>")<EOL>action = "<STR_LIT>"<EOL><DEDENT>m_click = self.__multi_click<EOL>with m_click.lock:<EOL><INDENT>double = m_click.check_double(button)<EOL>double_action = '<STR_LIT>' % action<EOL>if double:<EOL><INDENT>action = double_action<EOL><DEDENT>cb = getattr(self, '<STR_LIT>' % action, None)<EOL>double_handler = getattr(self, '<STR_LIT>' % double_action, None)<EOL>delay_execution = (not double and double_handler)<EOL>if delay_execution:<EOL><INDENT>m_click.set_timer(button, cb, **kwargs)<EOL><DEDENT>else:<EOL><INDENT>self.__button_callback_handler(button, cb, **kwargs)<EOL><DEDENT><DEDENT>
Maps a click event with its associated callback.

Currently implemented events are:

============  ================  =========
Event         Callback setting  Button ID
============  ================  =========
Left click    on_leftclick      1
Middle click  on_middleclick    2
Right click   on_rightclick     3
Scroll up     on_upscroll       4
Scroll down   on_downscroll     5
Others        on_otherclick     > 5
============  ================  =========

The action is determined by the nature (type and value) of the callback
setting in the following order:

1. If null callback (``None``), no action is taken.
2. If it's a `python function`, call it and pass any additional
   arguments.
3. If it's name of a `member method` of current module (string), call
   it and pass any additional arguments.
4. If the name does not match with `member method` name execute program
   with such name.

.. seealso:: :ref:`callbacks` for more information about
 callback settings and examples.

:param button: The ID of button event received from i3bar.
:param kwargs: Further information received from i3bar like the
 positions of the mouse where the click occured.
:return: Returns ``True`` if a valid callback action was executed.
 ``False`` otherwise.