がけにOn the way / just as leaving
がけに marks something that happens while setting out, going, returning, or passing by. Depending on the movement expression and context, it can mean either “on the way” or “just as someone was leaving.”
The context determines the timing
帰りがけ and 行きがけ commonly describe something done along a route. 出がけ usually focuses on the moment of setting out. There is no single English translation that fits every combination.
Route and departure edge
Notice how the movement expression changes the most natural interpretation.
The following particle
The suffix creates a noun-like time expression. に marks the occasion when something happens, while の connects the expression to a following noun.
Before a noun
私は帰りがけの同僚に、明日の会議の資料を渡した。
I gave the materials for tomorrow's meeting to a coworker who was on the way home.
Analyze帰りがけの modifies the coworker, so it is the coworker who was leaving.
Two important contrasts
Compare 帰りがけ with 帰る途中. The first is a compact, established expression for the route home; the second uses a broadly productive expression meaning “in the middle of” a journey or process. Also keep voiced がけ separate from unvoiced かけ, which attaches productively to a verb stem to describe an unfinished action.
More examples
私は行きがけにコンビニで水を買った。
I bought water at a convenience store on the way there.
Analyze帰りがけに、受付へ鍵を返してください。
Please return the key to reception on your way out.
Analyze私は出がけに財布がないことに気づいた。
Just as I was leaving, I realized that my wallet was missing.
Analyze彼は通りがけに店の看板を見上げた。
As he passed by, he looked up at the shop's sign.
Analyze出がけの電話で、私たちの予定が変わった。
A phone call just as we were leaving changed our plans.
Analyze私は帰りがけに同僚と駅まで歩いた。
On my way home, I walked to the station with a coworker.
Analyze