'A widget can call this method to grab the keyboard focus
and receive keyboard messages. When done,
widget_ungrab_keyboard() must be called.'

def widget_grab_keyboard(self, widget):

    self.window.handle_KeyPress = widget.handle_KeyPress
    self.saved_focus = self.qtile.currentWindow
    self.window.window.set_input_focus()
