piranha/keymage

Return prepared unbind()-function from keymage()

RickWong opened this issue · 2 comments

It's a increasingly popular pattern to return an undo/unbind function as a result to a do/bind function call.

var unbindOk = keymage("o k", ...);

// Later
unbindOk();

The unbindOk also acts as a reflectional variable to verify whether the binding has happened before, for example to prevent duplicate bindings.

That's a good idea! You (or anybody else) are welcome to take on it. :)

Maybe I'll look into doing that in a week or two if nobody starts doing that...

Thanks for doing that! :)