def clear_inputhook():
 pyos_inputhook_ptr = ctypes.c_void_p.in_dll(ctypes.pythonapi, 'PyOS_InputHook')
 pyos_inputhook_ptr.value = ctypes.c_void_p(None).value
 allow_CTRL_C()

def clear_inputhook ( ) : pyos_inputhook_ptr = ctypes . c_void_p . in_dll ( ctypes . pythonapi , 'PyOS_InputHook' ) pyos_inputhook_ptr . value = ctypes . c_void_p ( None ) . value allow_CTRL_C ( )
set pyos_inputhook to null and return the previous one .