code: def qteProcessKey(self, event, targetObj):
          msgObj = QtmacsMessage((targetObj, event), None)
          msgObj.setSignalName('qtesigKeypressed')
          self.qteMain.qtesigKeypressed.emit(msgObj)
          if event.key() in (QtCore.Qt.Key_Shift, QtCore.Qt.Key_Control,
                             QtCore.Qt.Key_Meta, QtCore.Qt.Key_Alt,
                             QtCore.Qt.Key_AltGr):
              return False
          self._keysequence.appendQKeyEvent(event)
          isRegisteredWidget = hasattr(targetObj, '_qteAdmin')
          if isRegisteredWidget and hasattr(targetObj._qteAdmin, 'keyMap'):
              keyMap = targetObj._qteAdmin.keyMap
          else:
              keyMap = self.qteMain._qteGlobalKeyMapByReference()
          (macroName, isPartialMatch) = keyMap.match(self._keysequence)
          keyseq_copy = QtmacsKeysequence(self._keysequence)
          if isPartialMatch:
              if macroName is None:
                  msgObj = QtmacsMessage(keyseq_copy, None)
                  msgObj.setSignalName('qtesigKeyseqPartial')
                  self.qteMain.qtesigKeyseqPartial.emit(msgObj)
              else:
                  if self._qteFlagRunMacro:
                      self.qteMain.qteRunMacro(macroName, targetObj, keyseq_copy)
                  msgObj = QtmacsMessage((macroName, keyseq_copy), None)
                  msgObj.setSignalName('qtesigKeyseqComplete')
                  self.qteMain.qtesigKeyseqComplete.emit(msgObj)
                  self._keysequence.reset()
          else:
              if isRegisteredWidget:
                  tmp = keyseq_copy.toString()
                  tmp = tmp.replace('<', '&lt;')
                  tmp = tmp.replace('>', '&gt;')
                  msg = 'No macro is bound to <b>{}</b>.'.format(tmp)
                  self.qteMain.qteLogger.warning(msg)
                  msgObj = QtmacsMessage(keyseq_copy, None)
                  msgObj.setSignalName('qtesigKeyseqInvalid')
                  self.qteMain.qtesigKeyseqInvalid.emit(msgObj)
              else:
                  if self._qteFlagRunMacro:
                      self.qteMain.qteRunMacro(
                          self.QtDelivery, targetObj, keyseq_copy)
              self._keysequence.reset()
          msgObj = QtmacsMessage((targetObj, keyseq_copy, macroName), None)
          msgObj.setSignalName('qtesigKeyparsed')
          self.qteMain.qtesigKeyparsed.emit(msgObj)
          return isPartialMatch