<head>
<script type="text/javascript">
function checkKey()
{
if (window.event.shiftKey) // checks whether the SHIFT key
// is pressed
{
txtOutput.value = "true"; // returns TRUE if SHIFT is pressed
// when the event fires
}
}
</script>
</head>
<body>
<p>Press the SHIFT key while pressing another key.<br>
<input type="text" name="txtEnterValue" onkeypress="checkKey()"> </p>
<p>Indicates "true" if the shift key is used.<br>
<input type="text" name="txtOutput"> </p>
</body>