Hey there. In terms of knowing “what is a ledge”, there is no engine code that does this right now. I think many users will have a very different interpretation as to what is a ledge and what is not. However knowing that you are starting to fall because you walk off a walkable surface is something we can do.
It sounds like you want to check the OnMovementModeChanged() event on Character to know that you started falling when you were previously walking (there is a PrevMovementMode variable you can check). The one thing about this however is that we don’t currently mark whether you are falling because you jumped or walked off a surface (or the surface became unwalkable possibly because the normal changed).
While you should be able to determine that distinction yourself (since you hook up the jump input), if you think this is something that would be useful we could add a notification that basically says “I’m about to start falling because I walked off” to distinguish it. In code you could simply override UCharacterMovementComponent::CheckFall() to do this, but for BPs we’d have to add an event. Let me know if you think this is something that would be useful and we can look in to it!