The committee has gone around several times on the
stack effects. Whatever is decided will violate somebody's
practice and penalize some machine. This way doesn't interfere
with type-ahead on some systems, while requiring the
implementation of a single-character buffer on machines where
polling the keyboard inevitably results in the destruction of
the character.
Use of
KEY or
KEY? indicates that the
application does not wish to process non-character events,
so they are discarded, in anticipation of eventually receiving
a valid character. Applications wishing to handle non-character
events must use
EKEY and
EKEY?. It is possible
to mix uses of
KEY?/
KEY and
EKEY?/
EKEY within a single application, but
the application must use
KEY? and
KEY only
when it wishes to discard non-character events until a valid
character is received.