I tried to implement keyboard detection on canvas. Basically, i just wanna move my rectangle to the right and the left sides by x :) Here is my code where I added fucntion player and object player, and also Event Listener.

```
function Player() {
    this.x = 0, this.y = 0, this.w = 50, this.h = 50;
    this.render = function () {

        context.fillStyle = "white";
        context.fillRect(this.x, this.y, this.w, this.h);
    }

}

```

However, it does not show anything! everything is gone. Whats happened? I think I am using Event listener right...Any help will appreciated. Thanks