KBDPUTC(9)                                             KBDPUTC(9)

     NAME
          kbdputc, kbdq - keyboard interface to cons(3)

     SYNOPSIS
          void    kbdputc(Queue *q, int c)

          extern  Queue *kbdq;

     DESCRIPTION
          This is the internal interface between cons(3) and the
          platform-dependent keyboard driver.  Before calling any of
          these functions, the global variable kbdq must be ini-
          tialised; cons(3) does not initialise it.  This is usually
          done during system initialisation by the keyboard driver's
          kbdinit or kbdenable function , as follows:

               kbdq = qopen(4*1024, 0, 0, 0);
               qnoblock(kbdq, 1);

          Kbdputc puts a Unicode character c (ie, a `rune') on the
          given q, as a sequence of bytes in UTF-8 encoding (see
          utf(6)). It is up to the platform's keyboard driver to map a
          physical keyboard character, or a combination of them (for
          instance, following keyboard(6)) to a given Unicode charac-
          ter.

     SOURCE
          /sys/src/9/*/kbd*.c

     SEE ALSO
          cons(3), utf(6), qio(9)

     Page 1                       Plan 9             (printed 4/26/24)