Etymology
The verb is probably:
* partly onomatopoeic, from the sound of something being beaten (compare whack); and
* partly derived from Late Middle English twakken, twake (“to hit (someone) with something; to pat; to stroke”), probably from Middle English thakken, thakke (“to dab; to pat; to stroke”) [and other forms] (whence thack (obsolete except Britain, dialectal)), from Old English þaccian (“to beat; to pat; to touch softly, stroke; to strike gently, clap, tap”), from Proto-West Germanic *þakkōn, from Proto-Germanic *þakwōną (“to pat; to tap; to touch”), from Proto-Indo-European *teh₂g- (“to grasp with the hand; to touch”). Doublet of tangent.
The noun and interjection are derived from the verb.
Cognates
* Latin tangō (“touch”)
* Old Dutch þakolōn (“to stroke”)
* Old Norse þykkr (“a blow, th