~たとたん(に)
The moment …, as soon as … (unexpectedly)
N3
V-ta + とたん(に)
~たとたん(に) says that the moment A happened, B happened right away, usually something unexpected ({立|た}ち{上|あ}がったとたん、{腰|こし}が{痛|いた}くなった). The main clause cannot be the speaker's own intention, command or invitation; for a planned 'do B right after A' use ~たらすぐ or ~てすぐ. Learners often use the wrong form: とたん always follows the ta-form. It narrates something that happened, so the main clause is usually in the past.
Examples
外に出たとたん、雨が降り出した。
The moment I went outside, it started to rain.
重い箱を持ち上げたとたんに、腰が痛くなった。
As soon as I lifted the heavy box, my back started to hurt.
社長が部屋に入ったとたん、みんな静かになった。
The moment the president entered the room, everyone went quiet.
Exercises
1.スイッチを入れた 、機械から変な音がした。
2.電車のドアが閉まった 、忘れ物に気がついた。