You could use finterp.
The moment the relevant key gets pressed, a new target speed is set and the code moves between speeds like this
You just set ‘new max speed’ when a key is pressed.
You’ll need to twiddle with the inter speed to get it to your liking. If you want a more timeline feel to it, you can also try

