input-pending-p look for
input by calling
event_stream->event_pending_p and looking in
[V]unread-command-event and the
do not check for an executing keyboard macro, though).
discard-input cancels any command events pending (and any
keyboard macros currently executing), and puts the others onto the
command_event_queue. There is a comment about a “race
condition”, which is not a good sign.
read-char are higher-level
next-command-event gets the
next command event (i.e. keypress, mouse event, menu selection,
or scrollbar action), calling
dispatch-event on any others.
next-command-event and uses
event_to_character() to return the character equivalent. With
the right kind of input method support, it is possible for (read-char)
to return a Kanji character.