I read this sentence in a book
Le taxi s'éleva à la verticale. Gaal regardait par la fenêtre incurvée, en se cramponnant instinctivement à la banquette.
However, I dont understand the specific use on en in the second sentence, it doesn't seem to replace anything. Can somebody please explain it to me?