Open calistenson opened 5 years ago
Context: this was commented out because it was buggy. Was initially done more for convenience so it's low priority but it might be good to fix at some point.
Make the visualization tool start and stop with the space bar
Reinstate event listener on spacebar for pausing and playing visualization.
window.addEventListener("keypress", (e) => { console.log("keypress"); console.log(e); if (e.charCode == 32) { console.log("SPACEBAR"); var toggleplay = playbarhtml.find("#toggleplay"); toggleplay.trigger('click'); if (toggleplay.is(":checked")) { playbarhtml.find("#playbutton").trigger('mousedown'); } else { playbarhtml.find("#pausebutton").trigger('mousedown'); } } });