rendering canvas and reacting to keypresses