You should use the default method for movement input instead of what you currently have mocked up (its what comes setup when you first make the template project).
Then, for your sprint input, you want to set max walk speed based on pressed and released.
For pressed, max walk speed is sprint speed.
When released, max walk speed is normal speed.