Is the shift key being pressed down?
var x = event.getModifierState("Shift");
Write som text in the input field, then press down the Shift key and write some more text in the input field:
<!DOCTYPE html> <html> <body> <input type="text" size="40" onkeydown="myFunction(event)"> <p id="demo"></p> <script> function myFunction(event) {/*from w ww. j a v a2 s . c om*/ var x = event.getModifierState("Shift"); document.getElementById("demo").innerHTML = "Pressing the shift key: " + x; } </script> </body> </html>