N4
とき
When, At the time of
狭い駐車場で車のドアを開けたときにドアを壁にぶつけた。
When I opened my car door in a small parking lot, I banged it against the wall.
Explanation
「とき」 means 'when'. With verbs, the dictionary form and the 「た」-form mean different things.
Dictionary form + とき: the action has not happened yet, or is in progress. 「日本へ行くとき、カメラを買った」 (I bought a camera before going to Japan).
「た」-form + とき: the action is already done. 「日本へ行ったとき、カメラを買った」 (I bought a camera when I got to Japan).
Adjectives go straight before 「とき」; nouns need 「の」: 「子供のとき」.
Mixed up with
「行くとき」 and 「行ったとき」 are very different and often tested. Do not mix them up.
With a noun, do not forget 「の」: 「病気のとき」, 「子供のとき」.
With a na-adjective use 「な」: 「静かなとき」.