'Sets a character callback handler.
If a key is pressed it will be passed to this handler. Keys
include the curses.KEY_RESIZE key.
callback is a function taking a single arg -- the char pressed.
If callback is None, input will be ignored.'

def set_char_hdlr(self, callback):

    with self.inputlock:
        self.char_handler = callback
        if (callback is None):
            self.enabled.clear()
        else:
            self.enabled.set()
