docs: def qteSetKeyFilterPolicy(self, receiveBefore: bool=False,
                                useQtmacs: bool=None,
                                receiveAfter: bool=False):
          """
          Set the policy on how Qtmacs filters keyboard events for a
          particular widgets.
  
          The options can be arbitrarily combined, eg. ::
  
              widget.qteSetKeyFilterPolicy(True, True, False)
  
          will first pass the event to the applet's ``keyPressEvent``
          method and afterwards pass the same event to Qtmacs' keyboard
          filter.
  
          For all text-processing widgets (eg. ``QLineEdit``,
          ``QTextEdit``, ``QWebView``, etc.) it is almost always a good
          idea to use the default, ie. (False, True, False, False),
          which lets Qtmacs process everything. In this case the only
          way to interact with the widget is via macros (and the mouse).
  
          If ``receiveBefore`` and/or ``receiveAfter`` is set then
          ``qteKeyPressEventBefore`` and/or ``qteKeyPressEventAfter`` of
          the QtmacsApplet (not widget) is called to inspect the event.
  
          .. note:: The default behaviour is to let Qtmacs handle all
             keyboard events and interact with the applet only via
             macros. It may be more convenient for a programmer to
             handle keyboard events directly in the keyPressEvent
             routine, as is customary with Qt applications, but this
             compromises the customisation ability of Qtmacs. As a rule
             of thumb, applet classes should not implement keyPressEvent
             at all. However, since there is an exception to every rule
             Qtmacs allows it.
  
          .. note:: This method must be part of the qteAdmin object
                    because which is attached to every object under the
                    control of Qtmacs.
  
          |Args|
  
          * ``receiveBefore`` (**bool**): pass the keyEvent to the applet
            before Qtmacs processes it.
          * ``useQtmacs`` (**bool**): let Qtmacs parse the key.
          * ``receiveAfter`` (**bool**): pass the keyEvent to the applet
            after Qtmacs processed it.
  
          |Returns|
  
          * **None**
  
          |Raises|
  
          * **QtmacsArgumentError** if at least one argument has an invalid type.
          """
          # Store key filter policy flags.
          self.filterKeyEvents = useQtmacs
          self.receiveBeforeQtmacsParser = receiveBefore
          self.receiveAfterQtmacsParser = receiveAfter