code: function(event) {
  
          event.preventDefault();
  
          if ((window.kelmu.data[id].definitions['step' + window.kelmu.data[id].stepNumber] || [null]).length - 1 === window.kelmu.data[id].subStepNumber) {
  
            // Move to next step
            clearAnnotations();
            window.kelmu.data[id].stepNumber += 1;
            window.kelmu.data[id].subStepNumber = 0;
            if (window.kelmu.data[id].actions.updateEditor) {
              window.kelmu.data[id].actions.updateEditor(true, true);
            }
            originalStep(event);
  
            // If the animator is not able to report when the animation is ready,
            // create the annotations for the next step after a delay
            if (!window.kelmu.data[id].animationReadyAvailable) {
              setTimeout(function() {
                createAnnotations();
                if (window.kelmu.data[id].actions.updateEditor) {
                  window.kelmu.data[id].actions.updateEditor(true, true);
                }
              }, window.kelmu.data[id].settings.animationLength);
            }
          } else {
  
            // Move to next substep
            window.kelmu.data[id].subStepNumber += 1;
            window.kelmu.data[id].actions.setSubstep(window.kelmu.data[id].subStepNumber);
            if (window.kelmu.data[id].actions.updateEditor) {
              window.kelmu.data[id].actions.updateEditor(true, true);
            }
          }
  
          if (window.kelmu.data[id].stepsToRun === 0) {
            // Add the current state to the undo stack if there are no more steps to run
            window.kelmu.data[id].undoStack.splice(window.kelmu.data[id].undoStackPointer + 1, window.kelmu.data[id].undoStack.length);
            window.kelmu.data[id].undoStack.push([window.kelmu.data[id].stepNumber, window.kelmu.data[id].subStepNumber]);
            window.kelmu.data[id].undoStackPointer += 1;
          }
  
        }
docs: Functionality for step button.