4 ms·
This looks like it's doing basically the same thing that keymaster has already been doing, with an almost identical API: https://github.com/madrobby/keymaster
by bratsche 14y ago
This looks like it's doing basically the same thing that keymaster has already been doing, with an almost identical API:
https://github.com/madrobby/keymaster https://github.com/madrobby/keymaster
- jasonmoo 14y agoEverything's already been done everywhere, all the time. Choices are a great thing.
- craigc 14y agoThis offers a few additional things such as supporting Gmail style key sequences, binding keyup events, supporting keys that require the shift modifier using their key name "?", triggering key commands programmatically, etc.
- mcrittenden 14y agoAwesome! I'm super excited about this. I've been using keymaster for my Chrome extension for custom key bindings [1] but it's suffering from two issues: - Lack of "key-sequences" ala Gmail - Bug where focusing on a page having already pushed down a modifier doesn't tell keymaster that the modifier is pushed. For example if you ctrl+tab to a page and keep the control key pushed, then hit an action key (say "f"), then what you really want is to trigger ctrl+f but keymaster doesn't recognize it because it doesn't see ctrl as having been pressed since it was already held down before the page had focus. Looks like Mousetrap fixes both of these issues. Thanks a ton! 1: https://chrome.google.com/webstore/detail/logpjaacgmcbpdkdchjiaagddngobkck https://chrome.google.com/webstore/detail/logpjaacgmcbpdkdch...
- mmahemoff 14y agoI've found Keymaster good in the past, but the project really isn't being maintained. (https://github.com/madrobby/keymaster/issues?direction=desc&sort=created&state=open https://github.com/madrobby/keymaster/issues?direction=desc&...) It would be nice to see an ongoing project for this, with keyboard shortcuts becoming more popular (in use at Twitter, GitHub, and Google Plus for example). I'm planning to add the functionality on my own app soon and will take a look at this.
- Keithamus 14y agoSee also http://keithcirkel.co.uk/jwerty/ http://keithcirkel.co.uk/jwerty/
- jayroh 14y agoKeymaster has stagnated a bit, that's correct, but it's still a pretty quality piece of work. I'm using it for my own keyboard shortcut (jquery) plugin here : http://joeloliveira.com/chaves.js/demo/defaults.html http://joeloliveira.com/chaves.js/demo/defaults.html The goal of my plugin isn't to just bind keys but to provide sensible defaults and an easy interface to either override the defaults or create your own, as well as have a built-in mechanism to display a "help" modal window. After all, what good are keyboard shortcuts if you don't know what they are. Check it out. Would love any feedback (sorry, Craig, for me-too'ing / "hey look at me too"'ing your post).