code: def __init__(self, context):
      self._quit = False
      GLib.io_add_watch(
          context.fileno(), GLib.PRIORITY_DEFAULT, GLib.IO_IN, self.quit
      )
  
imports: from gi.repository import GLib
label_desc: Use image node_id 1 to create a new _InputHook object  with example: obj = _InputHook(context)