noun
on the way here; while coming
Used adverbially, typically as 来がけに, to describe an action performed on the way to the current location. Often paired with 行きがけ (on the way there).
See also: 行き掛け
来がけにコンビニでおにぎりを買った。
I bought a rice ball at the convenience store on the way here.
来がけに駅前で友達に会った。
I ran into a friend in front of the station on my way here.
行きがけ means 'on the way there' (away from the speaker's current location), while 来がけ means 'on the way here' (toward the speaker's current location).
Compound of 来 (ki, 'coming', the continuative form of 来る) and 掛け (gake, 'in the process of', from 掛ける). The exact historical derivation is uncertain, but the structure parallels 行きがけ (ikigake).