Registering Keyboard Shortcuts


How would I run some javascript function on a keyboard shortcut, i.e. Ctrl+S to save?

The only things I could think of that would work are the global-shortcut api or registering the keystroke like normal in the web page javascript. However, the api seems to be for a different use, and I could not manage to get any traditional keybinding methods to work.

Any ideas? Thanks in advance.


Hi. Did you find a solution for this?
EDIT: I found a solution and wrote about it here: