Keira Knightley had a difficult pregnancy with her second child, but it inspired her to take on her latest role.