Hola de nuevo.
Tienes que utilizar una variable global para saber qué cuadro de texto ha tenido el foco:
Código PHP:
<html>
<head>
<script type="text/javascript">
var foco = null;
function pulsar(e,obj) {
if (e.keyCode==13) {
foco.value = obj.value;
obj.style.display = 'none';
}
}
</script>
</head>
<body>
<form>
<input type="text" name="txt1" onfocus = "foco=this; txt.style.display='block'; txt.value = this.value; txt.focus()" />
<input type="text" name="txt2" onfocus = "foco=this; txt.style.display='block'; txt.value = this.value; txt.focus()" />
<textarea name="txt" style="display:none" onkeypress = "return pulsar(event,this)"></textarea>
</form>
</body>
</html>
Saludos,