Bind ``macroName`` to all widgets in ``appletObj``.

        This method does not affect the key bindings of other applets,
        or other instances of the same applet.

        The ``keysequence`` can be specified either as a string (eg
        '<ctrl>+x <ctrl>+f'), or a list of tuples containing the
        constants from the ``QtCore.Qt`` name space
        (eg. [(ControlModifier, Key_X), (ControlModifier, Key_F)]), or
        as a ``QtmacsKeysequence`` object.

        |Args|

        * ``keysequence`` (**str**, **list** of **tuples**,
          **QtmacsKeysequence**):
          key sequence to activate ``macroName`` for specified
          ``widgetSignature``.
        * ``macroName`` (**str**): the macro to associated with
          ``keysequence``.
        * ``appletObj`` (**QtmacsApplet**): only widgets in this
          applet are affected.

        |Returns|

        * **bool**: whether or not at least one widget was
          successfully bound.

        |Raises|

        * **QtmacsArgumentError** if at least one argument has an invalid type.
        * **QtmacsKeysequenceError** if the provided ``keysequence``
          could not be parsed.

def qteBindKeyApplet(self, keysequence, macroName: str,
                         appletObj: QtmacsApplet):
        """
        Bind ``macroName`` to all widgets in ``appletObj``.

        This method does not affect the key bindings of other applets,
        or other instances of the same applet.

        The ``keysequence`` can be specified either as a string (eg
        '<ctrl>+x <ctrl>+f'), or a list of tuples containing the
        constants from the ``QtCore.Qt`` name space
        (eg. [(ControlModifier, Key_X), (ControlModifier, Key_F)]), or
        as a ``QtmacsKeysequence`` object.

        |Args|

        * ``keysequence`` (**str**, **list** of **tuples**,
          **QtmacsKeysequence**):
          key sequence to activate ``macroName`` for specified
          ``widgetSignature``.
        * ``macroName`` (**str**): the macro to associated with
          ``keysequence``.
        * ``appletObj`` (**QtmacsApplet**): only widgets in this
          applet are affected.

        |Returns|

        * **bool**: whether or not at least one widget was
          successfully bound.

        |Raises|

        * **QtmacsArgumentError** if at least one argument has an invalid type.
        * **QtmacsKeysequenceError** if the provided ``keysequence``
          could not be parsed.
        """
        # Convert the key sequence into a QtmacsKeysequence object, or
        # raise a QtmacsKeysequenceError if the conversion is
        # impossible.
        keysequence = QtmacsKeysequence(keysequence)

        # Verify that Qtmacs knows a macro named 'macroName'.
        if not self.qteIsMacroRegistered(macroName):
            msg = ('Cannot bind key because the macro <b>{}</b> does'
                   'not exist.'.format(macroName))
            self.qteLogger.error(msg, stack_info=True)
            return False

        # Bind the key also to the applet itself because it can
        # receive keyboard events (eg. when it is empty).
        appletObj._qteAdmin.keyMap.qteInsertKey(keysequence, macroName)

        # Update the key map of every widget inside the applet.
        for wid in appletObj._qteAdmin.widgetList:
            self.qteBindKeyWidget(keysequence, macroName, wid)
        return True