Commence macro recording.

        Macros are recorded by connecting to the 'keypressed' signal
        it emits.

        If the recording has already commenced, or if this method was
        called during a macro replay, then return immediately.

def qteStartRecordingHook(self, msgObj):
        """
        Commence macro recording.

        Macros are recorded by connecting to the 'keypressed' signal
        it emits.

        If the recording has already commenced, or if this method was
        called during a macro replay, then return immediately.
        """
        if self.qteRecording:
            self.qteMain.qteStatus('Macro recording already enabled')
            return

        # Update status flag.
        self.qteRecording = True

        # Reset the variables.
        self.qteMain.qteStatus('Macro recording started')
        self.recorded_keysequence = QtmacsKeysequence()

        # Connect the 'keypressed' and 'abort' signals.
        self.qteMain.qtesigKeyparsed.connect(self.qteKeyPress)
        self.qteMain.qtesigAbort.connect(self.qteStopRecordingHook)