Hola jostrix.
Supongo que te refieres a pulsar la tecla enter. Aquí tienes un ejemplo:
Código HTML:
<html>
<head>
<script>
function pulsar(e) {
tecla=(document.all) ? e.keyCode : e.which;
if(tecla==13) alert('Enter pulsado');
}
</script>
</head>
<body>
<input type="text" onkeypress="pulsar(event)" />
</body>
</html>
Saludos,