initViewportEvents

Sets up the event handlers for the canvas.