Switch directions of the THREE.Mesh object smoothly

Hi,
I have a mesh geometry that I am trying to move using WASD.
However, it sorts of stop to change the operation as in from moving forth to back or moving back to rotate. I guess it is because it is reading only the single key press.

Here is my code for moving the object:

  var moveDistance = 0.5;
        var keyCode = event.which;
        if (keyCode === 87) {
            object.translateX(moveDistance);
        } else if (keyCode === 83) {
            object.translateX(-moveDistance);
        } else if (keyCode === 65) {
            object.rotation.y += (Math.PI / 2) * 0.05;
        } else if (keyCode === 68) {
            object.rotation.y -= (Math.PI / 2) * 0.05;
        }

How can I make it smoother/ detect multiple keypresses?
Thank you.

<script>
key_p = {};
</script>
<input id=xval>
<input onmouseover="focus()" onmouseout="blur()" value="Press Any Key" type=button onkeyup="delete(key_p[event.keyCode]); xval.value = Object.keys(key_p)" onkeydown="key_p[event.keyCode] = 1; xval.value = Object.keys(key_p)">