$(document).on('keydown', '.link-group .video-trigger', function(e) { if ((e.key === "Enter" || e.key === " " || e.key === "Spacebar") && !e.shiftKey) { this.dispatchEvent(new MouseEvent('click', {bubbles: true, cancelable: true})); e.preventDefault(); } });