White-space fix.

Remove trailing spaces. Always, always, always enable this setting in
your editor if you do open source.
Prevent JS from hijacking user’s browser kb navigation

Can probably be improved further (may be needed for Windows users, but
I can't test that right now), but the better way to solve this properly
would be to use something like Mousetrap for all the key bindings,
anyway.