~ともなく/~ともなしに
Without meaning to …; idly; (from) somewhere / someone or other
N1
V (dictionary: {見|み}る, {聞|き}く, {言|い}う …) + ともなく/ともなしに / question word (+ particle) + ともなく
V+ともなく describes doing something without a clear intention, almost unconsciously: {見|み}るともなく{見|み}る, {聞|き}くともなく{聞|き}く (the same verb is often repeated). With question words it means 'it's not clear who/where/when': どこからともなく (from somewhere), {誰|だれ}からともなく (someone or other started), いつからともなく. It is a descriptive written expression found in novels and essays. It is close to 'without intending to' but more literary. It is not used for purposeful actions.
Examples
窓の外を見るともなく見ていると、雪が降り始めた。
As I was idly gazing out of the window, it began to snow.
隣の席の会話を聞くともなしに聞いていたら、知っている人の話だった。
I half-heard the conversation at the next table, and it turned out to be about someone I knew.
誰からともなく拍手が起こり、会場は温かい雰囲気に包まれた。
Someone started clapping, and the hall was filled with a warm atmosphere.
Exercises
1.どこから 、カレーのいい匂いがしてきた。
2.テレビを 見ていたら、故郷の町が映って驚いた。