Workaround to receive key events in the canvas