Can i detect if player tried to jump while he is riding mob?

I want to player be able stop riding mob(shift) and jump from it (space) but idk if it is possible to detect if player jump while riding mob?
Continue to help post