Recently I needed to add hotkeys to our application for quick navigation. The result of this work is the Hotkey plugin, which I’m releasing today.
The Hotkey plugin consists of a Javascript file and three helpers that use it. You can add a hotkey using Javascript directly using the Hotkey.add() function in your application.js, or you can use the helpers in your templates. Here’s a few examples of helper usage:
Calling an action remotely:
<%= hotkey_to_remote :d, :url => {:controller=>'some_controller'} %>
Changing browser location:
Recent comments
1 year 23 weeks ago
1 year 23 weeks ago
1 year 25 weeks ago
1 year 27 weeks ago
1 year 42 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 46 weeks ago
1 year 48 weeks ago