I have been wanting Javascript to trigger a button that will save the values from several textboxes and trigger a reset button for another element to load the values after the **enter** key is pressed. I know that the 2 buttons work correctly but the Javascript code I have for the key press trigger doesn't. 

**Example:**

Let's say I have this Javascript code:

```
document.getElementById("savevalues")
.addEventListener("keyup", function(event) {
event.preventDefault();
if (event.keyCode == 13) {
    document.getElementById("reset").click();
}
});

```

And let's say I have the following HTML:

```
<html>
<body>
<button onclick="savevalues()" id="savevalues">Button 1</button>
<button onclick="reset()" id="reset">Button 2</button>
</body>
</html>

```

What am I doing wrong? If you need to see the Javascript and HTML code, here is a link to my github project: <https://github.com/jamesestes1711/2048-hacked>
The Javascript file is located in the js folder and is named: game\_manager.js and the keypress code is at the bottom of the file. The HTML code is located in the home folder and is called: play.html. 

**EDIT**

I have tried changing .click() to reset() and still no change.