You need to make a system that determines if a key is pressed or not. This is very easy:
EDIT: In case this is not clear, "rightKey" must be stored, and so must "movement"
On key press event:
rightKey = true;
On key released event:
rightKey = false;
After that, you can use the event to overwrite the data:
movement = "right";
And to ACTUALLY check movement, do:
if (movement == "right" && rightKey) { move(whatever,0); }
You also need to add a case in case the "movement" key is actually not pressed. This would happen when you press 2 keys but release the last one -you need to add code to revert "movement" to the previous key.