Negative Inversion
Hardly + Past Perfect + when …
No sooner + Past Perfect + than …
1) I got to the train station! 09:59
2) The train left! 10:00
I just managed to catch the train!
Hardly had I got to the station (1) when the train left (2).
No sooner had I got to the station (1) than the train left (2)!
1) He left the house! 8:35am
2) The bus arrived! 08:37am
Hardly had he left the house (1) when the bus arrived (2).
No sooner had he left the house (1) than the bus arrived (2).
Negative Inversion is often taught at C1 or C2 level. However, I normally teach it much earlier - in B2, or sometimes even in B1 if I think that the students can handle it. Once you understand how the Past Perfect works, it's really quite easy. The numbers in the sentences above indicate which action happened first (1) and which action happened second (2).
Now try these:
1) I arrived at school. 7:58am
2) My first lesson started. 8:00am
Hardly
No sooner
1) We bought our tickets for the film. 8:27pm
2) It started. 8:30pm
Hardly
No sooner