Thanks for the feedback. I didn't implement something like a input buffer to store inputs a bit ahead of time to makes things run a bit better. Also I only tested that on Firefox, I'm guessing there could be some differences depending on the platform :/