Hokke-js is a project mainly written in JavaScript, it's free.
Hokke.js is define hotkey library.
hot-key -> hokey -> hokke
hokke is delicious fish
http://ja.wikipedia.org/wiki/%E3%83%9B%E3%83%83%E3%82%B1
http://tanabe.github.com/Hokke-js/
Hokke.map("j", function(){alert("j")});
arrow keys are Left, Up, Right and Down.
Hokke.map("Up", function(){alert("up")});
Enter, Space key is available too.
Hokke.map("Enter", function(){alert("enter")});
Hokke.map("Space", function(){alert("space")});
modifier keys are Shift, Ctrl and Alt.
this mapping is Shift-j.
Hokke.map("S-j", function(){alert("j with Shift key")});
more complex, this mapping is Shift-Ctrl-Right.
Hokke.map("S-C-j", function(){alert("j with Shift key and Ctrl key")});
this is mapping to anchor element (a tag).
//HTML
<a href="http://google.com" id="google" target="_blank">google</a>
//JavaScript
Hokke.map("C-g", document.getElementById("google"));
if anchor element has onlick handler, onlick handler is high priority.
//HTML
<a href="http://google.com" id="google" onclick="alert('google');>google</a>
//JavaScript
Hokke.map("C-g", document.getElementById("google"));
Hokke.js can define any command.
this command definition means "user typed 'google' within 5 seconds, alert showing".
Hokke.command(["g", "o", "o", "g", "l", "e"], alert("google"), 5000);