brettmclean / pad4pi

Interrupt-based matrix keypad library for Raspberry Pi
GNU Lesser General Public License v3.0
51 stars 19 forks source link

Allow key press handlers to be unregistered #1

Closed brettmclean closed 9 years ago

brettmclean commented 9 years ago

Client code can currently register handler functions to be called when a button is pressed on the keypad. Ideally, client code should also be able to unregister handler functions when they no longer want a certain action to be performed on key press.

Currently, the only way to do this is to call keypad.cleanup() and then create a new Keypad instance, which is inconvenient.