Allows shortcuts to be assigned to more than one scope
Allows a handler to be assigned to multiple scopes like so:
key('c', 'hello, world', callback_function)
Fixed! Multiple scopes can now only be separated by commas.
Hey! This code is leaking globals. Also, before I can accept it, it needs to have tests written (I still need to get around to write basic scope tests). Additionally, the README should be updated.
I believe I fixed everything with the exception of the unit tests. For some reason I can't for the life of me figure out why mine is failing. I committed it anyway, so feel free to take a look at it and see if you can find anything wrong with it.
I may be wrong, but I think this fix doesnt do what you're expecting - which is why your test is failing.
What you appear to have written is code to allow multiple scopes to executed at once i.e.
key('a','awesomecope1', function(){}); key('b','awesomecope2', function(){});
key.setScope('awesome1, awesome2');
I've add this as a test and it works fine so I will push this to your repo for you