Hi everyone!
Finally! After two long nights studying the code I found a way to send messages by pressing Enter key!
The key is in /js/chat.js in a function called
function(k) (better look for it using a editor). This function uses two variables:
k and
kh to store the ASCII code of each one of the characters we enter in the textarea and the ASCII code for the CTRL key; so, the first step is to remove this
kh variable (inside the if-else structure near to the declaration of the function).
The second step is to remove the
myRealAgent variable from the condition clausule:
if(this.pq.xt&&((k==015&&(kh||myRealAgent=='o\160er\141'))||(k==012))) (also remove
kh)
After this two steps we should get a function like this:
function(k){if(k){k=k.which;} else{k=event.keyCode;} if(this.pq.xt&&((k==015)||(k==012))){...}.
Finally, we should change the message that appears in the bottom-right corner of the chat window (CTRL-Enter) by editing the file
/libs/chat.php. Search for
$page['send_shortcut'] PHP variable and change its value for "Enter" (for example).
Restart the chat! Et voilá! (unless it worked perfectly in IE and Firefox, don´t know Opera nor Safari, sorry
).
Hope this may be useful!
Bye!
PD: Sorry for my English...