たとたん(に) (ta totan ni): The moment an action is completed
~たとたん(に) (ta totan ni)
Meaning
The moment; just as; immediately after
Formation and usage
Past ta-form verb + とたん(に), followed by an event occurring immediately, usually unexpectedly.
Explanation
An event occurs the instant the preceding action finishes, often unexpectedly. The second clause normally does not state the speaker's intention, command, or invitation. It is more immediate than simply after a while.
Examples
窓を開けたとたん、強い風が入ってきました。
The moment I opened the window, a strong gust came in.
席に座ったとたん、名前を呼ばれました。
Just as I sat down, my name was called.
家を出たとたんに、雨が降り始めました。
The moment I left home, it started to rain.
電気を消したとたん、猫が走り出しました。
As soon as I turned off the light, the cat started running.
優勝が決まったとたんに、涙が出ました。
The moment my victory was confirmed, I burst into tears.
How related patterns differ
いつのまにか highlights a change whose timing went unnoticed. つつある describes an ongoing change, and うちに describes a change during a period. つい concerns an unintentional action, while たとたんに emphasizes a particular instant.