So in your movement/input code you would check if a variable named say is_climbing
of type bool is true or not and based on that the forward and back keys would instead move the character upwards or downwards. The is_climbing boolean value could also be used to determine if the hands should be visible or not.
The state of the boolean could be toggled based on collision or area overlap signal from the player, so if body is ladder or such.
If you don't want to deal with a sea of if/elif/else mess using match instead should work too.