My only problem is that I am editing the html file directly on the server with nano, so I just commit some mistakes that I could not recognize.
Basically doing:
var word = "";
function dump(e){
var unicode = e.keyCode? e.keyCode : e.charCode;
var actualkey = String.fromCharCode(unicode);
word += actualkey;
alert(word);
}
document.onkeypress = dump
I am able to see the keys concatenating which was my main problem. After that I will just adjust the values to an array and join them neatly like @Diodeus suggested.