im moving the character with on key press x+=10;

trouble is if i hold the key to long the character zoooms of the screen since x is having ten added constantly so the amount it jumps in each interval is increased, how can i limit this? i tried just x+10 which didnt move it atall.

maybe im being stupid and missing something