For this you'll need to use the MSPointerDown event rather than click, because MSPointerDown's event args contains the pointer type. For example:
divElement.addEventListener("MSPointerMove", pointerMove);
function pointerDown(e) {
console.log("pointerDown type=" + e.pointerType);
}
e.pointerType will be 2 for touch, 3 for stylus, 4 for mouse. So far as I know, the "click" event doesn't provide this data, so you need to use MSPointerDown.
Kraig
Author,
Programming Windows 8 Apps with HTML, CSS, and JavaScript,
a free ebook from Microsoft Press