# Interactive input protocol

The unit at [io/key.fs] provides a universal protocol for providing the "key"
word, that is, a word that polls for interactive input. Most of the time, this
input is going to come from [io/kbd], but it can come from somewhere else, for
example a serial line.

The broad idea is that there's only one active interactive input at once and
this API plugs into it. We do so by realiasing "?key".

## Initialization example

needs io/key io/kbd drv/somekbd
newsomekbd to keyboard
' kbd?key ' ?key realias

## API

?key ( -- ?c f )
  Check the active input for new data. If available, f=1 and c is present as a
  ASCII character. Otherwise, f=0 and c is absent.

key ( -- c )
  Block until "?key" yields something, then yields it.

promptforkey ( -- )
  Called once at the beginning of the "key" loop. Defaults to a noop, but can
  be realias for, for example, display a prompt cursor.
