generativefm / generative.fm

A platform for playing generative music in the browser.
https://generative.fm
MIT License
1.58k stars 83 forks source link

adds keyboard event listener for playback controls #45

Closed rossvz closed 5 years ago

rossvz commented 5 years ago

New to contributing to open source, so let me know if I've done something wrong.

This adds a keyboard event listener hook that will listen for spacebar, arrow left, and arrow right to pause/play, previous, and next track respectively.

I noticed we are using a version of React above 16.8, so hooks should be supported, but wasn't sure if they were desired from a code style standpoint.

alexbainter commented 5 years ago

Hooks are bae. Nice work. I'll be sure to make a CONTRIBUTORS.md file with your name in it.