Enable input problem

hello, i have a problem with the node disable input. i would like to create a shield system that when activated blocks my character’s movement, so i created a system that disables the player’s input when the key is pressed, but when i release my key the node enable input doesn’t work since the input is disabled. so i would like to know how to disable my character’s movement and other actions except the shield action.