A keyboard shortcut library for javascript.
You can download the library from releases (middle right).
Put it in your your projects folder and link it in your index.html file.
<script src="path/to/binds.js"></script>
myBind1 = new BindElt(myButtonElement);
myBind2 = new BindFxn(myFunctionPointer);
myBind1.addKeyBind("a");
myBind2.addKeyCombination(Keys.Ctrl, "b");
myBind1.ignoreInputs(false);
myBind1.setName("name");
myBind2.preventDefault(true);
new BindFxn(function(){ console.log("Yea!") })
.setKeyBind("d")
.setName("Yeah!")
.setDescription("d for Yea!")
.preventDefault(true)
- Make a website for this thingy. Nevermind, i forgot a website needed css, I can make a cli for this i guess, but github is GOOD ENOUGH!