//Grade 9 Library V4 //Declarations var DuckFace = createObjectPic("duck.bmp"); //Setup function setup(){ DuckFace.x = 200; //These set the start coordinates for the duck DuckFace.y = 300; } //Main Game function engine(){ //Movement DuckFace.x = DuckFace.x + DuckFace.speedx; //Draw the object DuckFace.draw(); } //Mouse Click function onClick(){ } //Key presses function keyPress(key){ //To get key number codes Every key you press has a specific number code. The left arrow is actually 37. Try using: console.log(key); This will make the key code of any keys that are pressed appear in the debug log (CTRL+SHIFT+J) Here is a quick IF statement to decide what to do with the specific key numbers. Below I set up a left & right control. if(key == 37){ DuckFace.speedx = -5; }else if(key == 39){ DuckFace.speedx = 5; } }