You searched for:
“absentmindedly”
absentmindedly (adverb)
In a preoccupied manner or with unwarranted distraction of attention from the object of focus by irrelevant thoughts or some environmental events: "Today Alice absentmindedly put orange juice in her breakfast coffee."
"Jesse, the scientist, appeared to be puttering around in his garden absentmindedly, but he was really distracted because he was thinking about a new scientific formula."