I tried a simple event in 1.2 simulator and on the keon and it worked with the following code:
window.onkeypress = keypress;
function keypress(e) {
console.log("keypress event detected!");
if(e.which === 13 ){
console.log("return presses");
}
}