つい

Etymology 1
Possibly related to, with a semantic transition of “to attach” to “near”.

Adverb

 * 1) just now; quite near
 * 2) just now without thinking / subconsciously

Etymology 2
From.