Use arrow keys to move. To move the boat use the A and D keys. If you are on the boat and it is not moving click the down arrow. This will move the player downward and hopefully the boat will register that the player is on it and you will hopefully be able to move the boat, If you got the key and you are at the treasure chest click space and it should open. The key will disappear and make a noise when you collect it.
I watched Zinnea's tutorial on how to make a platformer game, the rest of the code/art is my own.