Hmm. Binds all events to `document`, which means that if you type something in a text field, it'll still trigger the event. (One of the TODOs is "Make behavior with INPUT / SELECT / TEXTAREA configurable.) Thing is, jQuery Hotkeys ( https://github.com/jeresig/jquery.hotkeys ) is more versatile (since you can bind events to any element), works under a wider range of browsers, and is nearly as lightweight (if you alrea…
It doesn't trigger events if you're in a INPUT/TEXTAREA/SELECT. The todo refers to making this configurable in a per-shortcut fashion.
Keymaster.js: painless keyboard shortcuts for javascript
11–20 of 23 posts
Re: Keymaster.js: painless keyboard shortcuts for javascript
#12Re: Keymaster.js: painless keyboard shortcuts for javascript
#13Why would you store a minified version in the VCS, especially not having it in sync with the original source code? Shouldn't it be an artefact kept out of the VCS and built automatically by, for example, make and UglifyJS?
It's more convenient with a minified source layoung around somewhere. Also it's quite small: (function(a){function j(a){d=a||"all"}function i(a,c,d){var g,h;d===undefined&&(d=c,c="all"),a=a.replace(/\s/g,""),g=a.split(","),g.forEach(function(a){h=[],a=a.split("+"),a.length>1&&(h=a.slice(0,a.length-1).map(function(a){return e[a]}),a=[a[a.length-1]]),a=a[0],a=a.length>1?f[a]:a.toUpperCase().charCodeAt(0),a in b||(b[a]=…
Re: Keymaster.js: painless keyboard shortcuts for javascript
#14Look, github is great and all, but will linking to your github repo really entice me to use your library? If its brownie points you're looking for in using github, you lost them by not providing a demo of the library and only a tiny bit of code that explains what it does.
Re: Keymaster.js: painless keyboard shortcuts for javascript
#15Look, github is great and all, but will linking to your github repo really entice me to use your library? If its brownie points you're looking for in using github, you lost them by not providing a demo of the library and only a tiny bit of code that explains what it does.
Re: Keymaster.js: painless keyboard shortcuts for javascript
#1691 for Mac meta/command is the left-hand button in webkit only. It's 224 in Firefox, and the right-hand one in webkit is 93.
Also, how to I bind to page up/down?
Re: Keymaster.js: painless keyboard shortcuts for javascript
#17Earlier quoted context omitted.
It's more convenient with a minified source layoung around somewhere. Also it's quite small: (function(a){function j(a){d=a||"all"}function i(a,c,d){var g,h;d===undefined&&(d=c,c="all"),a=a.replace(/\s/g,""),g=a.split(","),g.forEach(function(a){h=[],a=a.split("+"),a.length>1&&(h=a.slice(0,a.length-1).map(function(a){return e[a]}),a=[a[a.length-1]]),a=a[0],a=a.length>1?f[a]:a.toUpperCase().charCodeAt(0),a in b||(b[a]=…
By putting the source on github you're inviting people to use your code in their projects, and pick it apart. It's next to impossible to pick apart like this. In addition, a minified version is a build product, which you don't put in a VCS. Offer the minified version as a download, that's what that feature is there for.
Re: Keymaster.js: painless keyboard shortcuts for javascript
#18https://github.com/jeresig/jquery.hotkeys/blob/master/jquery...
in order to cover all special keys.
Re: Keymaster.js: painless keyboard shortcuts for javascript
#19Re: Keymaster.js: painless keyboard shortcuts for javascript
#20;(function(global)