What device are you using to test ? Keyboards will only output -1, 0 and 1 while a thumbstick for example would give you a value between -1 and 1. it will call it with value 0 when the key isnt pressed.
I don’t see anything wrong with your code, are you sure youre pressing the right key?