'Removes the widget\'s keyboard handler.'

def widget_ungrab_keyboard(self):

    del self.window.handle_KeyPress
    if (self.saved_focus is not None):
        self.saved_focus.window.set_input_focus()
