https://github.com/jaywcjlove/hotkeys-js
A robust Javascript library for capturing keyboard input. It has no dependencies.