dmauro/Keypress — pull request #31 by pelly (2014-02-11 14:06:32+00:00)
Title: unregister_many can use the results of register_many to unregister combos

It would be nice to allow unregister_many to undo the results of register_many by just feeding the results of register_many back into it:

registered1 = listener.register_many(some_combos)
registered2 = listener.register_many(some_other_combos)

listener.unregister_many(registered1) // now listener only has some_other_combos registered

I just made a simple change where register_combo returns the combo object instead of "true" - is that OK? A cursory glance didn't show anyplace where the return value of register_combo is needed/used.

I added a test as well that exercises the functionality.

I love the library overall - it's been really helpful for my projects!