@classmethod
def activate(cls, keymap=None, listen_events=None, run_thread=False):
    """Alternative constructor.

        Performs keys binding and runs a listener thread.

        :param dict keymap: Key name to function mapping.

        :param int listen_events: X Events or a combination of them.

        :param bool run_thread: Run a key listening loop in a thread.

        :rtype: KeyBinder

        """
    binder = cls(keymap=keymap, listen_events=listen_events)
    if keymap:
        binder.register_keys()
    else:
        binder.sniff()
    if run_thread:
        binder.run_thread()
    else:
        binder.listen()
    return binder
