Like in this template? (see video from 0:22)
construct.net/en
.
I'm guessing when character is overlapping the ledge and the "grab" key is pressed, you disable Platform behavior. While on the ledge, move the character left or right using events. Then when Up or Down key is pressed, re-enable Platform behavior.