I found it to be somewhat more tricky with keyboard events, looks like the canvas doesn't really become 'active', like e.g. a form input element could be, so that it'd capture keyboard input (or perhaps there's some html/css option to make it behave like that). In gfxapi I have just manually enumerated the common shortcut combinations and avoid .preventDefault()ing on them (unless page is in fullscreen mode).