class_docstr: DEPRECATED since IPython 5.0
  
  Manage PyOS_InputHook for different GUI toolkits.
  
  This class installs various hooks under ``PyOSInputHook`` to handle
  GUI event loop integration.
class_docstr_tok: ["DEPRECATED","since","IPython","5.0","Manage","PyOS_InputHook","for","different","GUI","toolkits",".","This","class","installs","various","hooks","under","``","PyOSInputHook","``","to","handle","GUI","event","loop","integration","."]
docstr: DEPRECATED since IPython 5.0
  
  Set PyOS_InputHook to callback and return the previous one.
code: def set_inputhook(self, callback):
      """DEPRECATED since IPython 5.0
  
      Set PyOS_InputHook to callback and return the previous one."""
      # On platforms with 'readline' support, it's all too likely to
      # have a KeyboardInterrupt signal delivered *even before* an
      # initial ``try:`` clause in the callback can be executed, so
      # we need to disable CTRL+C in this situation.
      ignore_CTRL_C()
      self._callback = callback
      self._callback_pyfunctype = self.PYFUNC(callback)
      pyos_inputhook_ptr = self.get_pyos_inputhook()
      original = self.get_pyos_inputhook_as_func()
      pyos_inputhook_ptr.value = ctypes.cast(
          self._callback_pyfunctype, ctypes.c_void_p
      ).value
      self._installed = True
      return original
  
imports: import os
  import platform
  import sys
  from distutils.version import LooseVersion
  from warnings import warn
label_desc: Use image node_id 5 for calling the InputHookManager obj's underlying member method code with example usage: obj.set_inputhook(callback) and returns: original