As Shadow commented, you want to use Action mapping rather than Input mapping.
Axis is intended to simulate (to some degree) joystick input, which must send “at center” data when at rest.
Using the key alters which data is sent, rather than initiating it.
Actions work the way you are expecting.
If I understand the effort, this is what you’re trying to do.