Hola, lorenzo.
 
Puedes utilizar el evento keyDown: 
 Código PHP:
    <html>
<head>
<script>
function contar(e) {
tecla = (document.all) ? e.keyCode : e.which;
if (tecla==16) alert('Mayúsculas pulsadas');
} 
</script>
</head>
 
<body>
<input type="text" onkeyDown="contar(event)">
</body>
</html> 
   
  el código de la tecla shift es 16, el de ctrl es 17. 
Saludos,  
