If you don't want a border to appear when you click on the canvas, set its style to outline: none
Press a key when the canvas has the focus: an alert will display the keycode of the key you pressed. Problem: if the canvas looses the focus, key press are no more detected...