attach keyboard event handlers only to canvas element, prevent default behavior and propagation