code: def qteKeyPress(self, msgObj):
          
          # Unpack the data structure.
          (srcObj, keysequence, macroName) = msgObj.data
  
          # Append the last QKeyEvent object to the so far recorded
          # sequence. Note that both ``keysequence`` and
          # ``self.recorded_keysequence`` are ``QtmacsKeysequence``
          # instances.
          last_key = keysequence.toQKeyEventList()[-1]
          self.recorded_keysequence.appendQKeyEvent(last_key)
docs: Record the key presses reported by the key handler.