Javascript touch event: distinguishing finger vs. Apple Pencil
问题 In Mobile Safari, is there any way to distinguish whether a touch event is generated by finger or Apple Pencil? 回答1: The TouchList object of a touch event contains detailed information about the touch’s individual points. Among the many properties touchType is probably the most interesting for you as it contains either stylus (Apple Pencil) or direct (finger). var body = document.getElementByTagName('body'); body.addEventListener('touchstart', function(evt){ // should be either "stylus" or