Since the preference for the keyboard shortcuts is set server-side, I had to shove them into a non-javascript context, and then access them via javascript, in a separate file. Since I'm not a javascript expert, I'm more than open to alternatives if this isn't the right way™ to do it.