Fix conflict with Cmd-Shift-A, and probably other third-party shortcuts

The Zotero shortcut keys, and their event.preventDefault(), were bound
to keydown, so shortcuts bound to keypress were still be called. This
moves most of the shortcut handling code into the keypress handler.

Fixes #344