I was coding a carousel solution for a client and wanted the automatic playback to stop if the user interacted with the image slider. First I thought that I would need some kind of custom solution but seems it was easier than i thought. The event itself actually carries information so only needed a few lines of extra code.

$( '#carousel-next' ).click( function(event) {
  // Triggered click from code
  if ( event.originalEvent === undefined ) {
    // do something....
  } else {
    continuePlayback = false;
  }
});