Function: waiting-for-user-input-p

Returns non-nil if Emacs is waiting for input from the user.
This is intended for use by asynchronous process output filters and sentinels.
(fn)