Go to Live Site Next Page
This handler gets called whenever a key goes up. We just check which key was released, and set the appropriate velocity to zero.
Try it now.
It's very smooth and responsive, and even better, we can do diagonals by holding two keys at the same time.