somehow; without realizing; unconsciously
Used after a volitional or interrogative word to indicate an action done without clear intention or awareness. Often appears in patterns like どこからともなく (from somewhere or other) or 見るともなく見る (to look without really looking).
どこからともなく音楽が聞こえてきた。
Music could be heard from somewhere or other.
見るともなく窓の外を見ていた。
I was looking out the window without really paying attention.
From the particle と (quotative) + も (inclusive) + 無く (adverbial form of 無い, 'not exist'). Literally 'without even saying/being that', it developed into a set phrase meaning 'without clear intention or source'.