<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.9.1.js'></script>
</head>
<body>
<div>Click here!!!</div>
<script type='text/javascript'>
var myArr = [];
document.addEventListener('keypress', function(e) {
var newContent = myArr.push(e.keyCode);
console.log(myArr);
});
</script>
</body>
</html>