Ist es ein Touchgerät

const isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0));