You'll want to start a timer variable every time the left/right button is pressed. then, in the 'on key pressed' condition, compare that timer to some amount. If it's less, then increase the max speed until it's released, then reset the max speed and the timer variable.
You'll need a timer for each direction.