<script type="text/javascript">function a() {alert('hola')}function pulsar(e) { var key=e.charCode||e.keyCode; if (key==66) a();}</script></head><body onkeypress = "pulsar(event)">