3 ms·
This might make more sense as a object model rather than class model. There is a lot of state behind the scenes (bind, trigger, reset), which would be natural f
by tantalor 14y ago
This might make more sense as a object model rather than class model. There is a lot of state behind the scenes (bind, trigger, reset), which would be natural for an object. Instead it is dumped into global state.
The use case might be to support multiple sets of key bindings, e.g., default, user specific, app specific, view specific. When you don't need one set anymore you just "reset" that set instead of resetting everything.