I not sure how to make map scrolling

I want my map to be controlled with arrow keys, to scroll left or right. the only way i can do this, it makes it infinitely go left or right, and i want it to stop when you stop.
here’s my game- https://flowlab.io/game/play/1371445

Hey! You can add this to your map object:
When you let go of a key - the object will stop moving.

Ok thanks