<html>
<head>
<script>
function isKeyPressed(event) {
var text = "The shift key was NOT pressed!";
if (event.shiftKey == 1) {
text = "The shift key was pressed!";
}
document.getElementById("demo").innerHTML = text;
}
</script>
</head>
<body onmousedown="isKeyPressed(event)">
<p>Click on this paragraph. An alert box will tell you if you pressed the shift key or not.</p>
<p id="demo"></p>
</body>
<!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_dom_event_shiftkey by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:41:14 GMT -->
</html>