Catherine amused herself with dancing to and fro before the door, while I tried all the large keys in succession. 
Catherine danced to and fro before the door, while I tried all the large keys in turn. 