I deliberately entered a river in order to cross it. I used Alt+direction and my adventurer began swimming around the river. But now I can't climb out, on neither of the two shores.
Is there a different key combination to climb out?
Are you at least a novince swimmer? Because if you're not
Dabbling or untrained swimmers will start drowning immediately upon contact with water, and require a ramp or stairway to get out. If neither are accessible, they're done for. (Emphasis Mine)
If you are, you should be able to alt-move above.
To get out, alt-move carefully against a shoreline and select the option to move above.