someElement.addEventListener("touchstart", (e) => {
// Log the state of this event's modifier keys
console.log(`altKey = ${e.altKey}`);
console.log(`ctrlKey = ${e.ctrlKey}`);
console.log(`metaKey = ${e.metaKey}`);
console.log(`shiftKey = ${e.shiftKey}`);
});TouchEvent: altKey property / notebook
TouchEvent: altKey property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.