From ecma6 javascript, we can use GlobalEventHandlers, to detect keys and touch events. There is a lot of different handlers for different events.
When the user touch/key/click an element, we can detect it in many ways, but for your exact query, a touch/click event is made of two different actions: ontouchstart and ontouchend.
It basically means that when ontouchend isn't triggered, the user is holding the element by touching, this is a long touch/click.
The following example use onmouseover, onmousleave, ontouchstart and ontouchend events.
shot.onmouseover = (function(){
console.log("Mouse action started!")
})
shot.onmouseleave = (function(){
console.log("Mouse action terminated!")
})
shot.ontouchstart = (function(){
console.log("Touch action started!")
})
shot.ontouchend = (function(){
console.log("Touch action terminated!")
})
#shot {width:100%;min-height:300px;background:red}
<div id="shot">Touch </div>