File:  [MW Coherent from dump] / coherent / a / usr / man / COHERENT / nkb
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:34 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent



nkb                       Device Driver                       nkb




Device driver for console keyboard


The  COHERENT device-driver  nnkkbb supports  industry-standard 83-,
101-, and 102-key  AT-protocol keyboards attached as the computer
console.

nnkkbb  lets you  define both  the  layout of  the keyboard  and the
values  returned by  function keys.   You  can change  layout and
function-key  bindings  by  using  the special  keyboard  mapping
programs kept in directory /ccoonnff/kkbbdd. This directory contains the
C source code for the mapping  tables, as well as a MMaakkeeffiillee that
helps you rebuild  the mapping programs.  See the Lexicon article
kkeeyybbooaarrdd ttaabblleess for details.

nnkkbb understands the following ``shift'' and ``lock'' keys:


          ssccrroollll  Scroll lock
          nnuumm     Keypad NUM lock
          ccaappss    Shift or CAPS lock
          llaalltt    Left ALT key
          rraalltt    Right ALT key
          llsshhiifftt  Left SHIFT key
          rrsshhiifftt  Right SHIFT key
          llccttrrll   Left CTRL key
          rrccttrrll   Right CTRL key
          aallttggrr   ALT Graphic key (non-US keyboards)


nnkkbb records  an internal shift  state, as defined  by the current
positions  of the  shift and  lock  keys.  The  shift state  is a
logical  combination of  internal  states SSHHIIFFTT,  CCTTRRLL, AALLTT,  and
AALLTT_GGRR. The  llsshhiifftt and rrsshhiifftt  keys combine to  form the current
SSHHIIFFTT state  for non-alphabetic keys.   Alphabetic keys generally
use the current state of the  ccaappss lock key in addition to llsshhiifftt
and rrsshhiifftt.  Numeric keys found  on the keypad  generally use the
state of  the nnuumm lock  key combined with llsshhiifftt  and rrsshhiifftt. The
two  ``control'' keys,  llccttrrll and rrccttrrll,  form the  internal CCTTRRLL
state.  In a similar manner, the two ``alt'' keys, llaalltt and rraalltt,
form  the  internal  AALLTT  state.   Note  that  102-key  keyboards
generally  replace the  rraalltt  key with  the aallttggrr  key, to  allow
access  to  the  alternate  graphics  characters  found  on  some
keyboards.

nnkkbb lets  you configure or  read the internal  mapping tables via
the  following  iiooccttll()  requests,  as  defined  in  header  file
<ssggttttyy.hh>:








COHERENT Lexicon                                           Page 1




nkb                       Device Driver                       nkb



          TTIIOOCCGGEETTFF  Get function key bindings
          TTIIOOCCSSEETTFF  Set function key bindings
          TTIIOOCCGGEETTKKBBTTGet keyboard table bindings
          TTIIOOCCSSEETTKKBBTTSet keyboard table bindings


Requests TTIIOOCCGGEETTFF and TTIIOOCCSSEETTFF reference a data structure of type
FFNNKKEEYY,  which is  a ttyyppeeddeeff  defined  in header  file <ssyyss/kkbb.hh>.
Structure  member kk_ffnnvvaall  is a character  array that  contains a
series of contiguous  function key/value bindings; the end of the
bindings is  marked by manifest  constant DDEELLIIMM. You  can use any
value  other  than  DDEELLIIMM  as  part  of a  function-key  binding.
Structure member  kk_nnffkkeeyyss indicates how many  function keys have
associated entries  in kk_ffnnvvaall.  Function keys are  numbered from
zero through kk_nnffkkeeyyss-1.

By convention, function-key  0, when enabled, causes the computer
system to reboot.  This function  key is usually bound to the key
sequence <ccttrrll><aalltt><ddeell>, but  you can disable it by setting the
value of driver-variable KKBBBBOOOOTT_ to zero.

Requests  TTIIOOCCGGEETTKKBBTT  and  TTIIOOCCSSEETTKKBBTT  reference  an  array  that
contains MMAAXX_KKEEYYSS occurrences of data structure KKBBTTBBLL, which is a
ttyyppeeddeeff
 defined  in  header  file  <ssyyss/kkbb.hh>.  Structure  member  kk_kkeeyy
contains the _s_c_a_n _c_o_d_e _s_e_t  _t_h_r_e_e code value for the desired key.
Header file <ssyyss/kkbbssccaann.hh> contains manifest (symbolic) constants
of the form KK__n_n_n, which  map AT keyboard _p_h_y_s_i_c_a_l key number _n_n_n
to the  corresponding scan-code set-three value  generated by the
keyboard.   Note  that  the  nnkkbb  driver disables  the  scan-code
translation  that the keyboard  controller normally  performs, as
well as setting the keyboard to scan code set three.

Structure member kk_vvaall  is a nine-element array that contains the
key mappings  that correspond to  the following index  values and
shift states:


          00         BBAASSEE
          11         SSHHIIFFTT
          22         CCTTRRLL
          33         CCTTRRLL_SSHHIIFFTT
          44         AALLTT
          55         AALLTT_SSHHIIFFTT
          66         AALLTT_CCTTRRLL
          77         AALLTT_CCTTRRLL_SSHHIIFFTT
          88         AALLTT_GGRR


Structure member kk_ffllaaggss  contains mode information for the given
key.  One field in kk_ffllaaggss indicates the _c_l_a_s_s of key.  This sub-
field  lets you  specify whether  a  key is  a ``shift''  key (as
defined above), a  special or programmable ``function'' key, or a
``regular''  key.  The following  symbolic constants  specify the
_c_l_a_s_s of key:


COHERENT Lexicon                                           Page 2




nkb                       Device Driver                       nkb




SS    The specified key is a ``shift'' or ``lock'' key.  Note that
     all entries in array kk_vvaall must be identical for a ``shift''
     or ``lock'' key to work correctly.

FF    The  specified key  is a ``function''  or special  key.  The
     value of all elements of array kk_vvaall must specify a function
     key number.  See header file <kkbb.hh> for a list of predefined
     function keys.

OO    The  specified key  is ``regular''  and requires  no special
     processing.

The  next sub-field  of  kk_ffllaaggss specifies  the _t_y_p_e  of key,  as
specified in the  AT keyboard technical reference.  The _t_y_p_e sub-
field specifies  under what conditions a  given key will generate
an interrupt.  The possible choices are:

MM    Make: generate  an interrupt  only upon key  ``make'' (i.e.,
     when the  key is depressed).   This mode is  useful for keys
     which  do  not  repeat.   Note  that  using this  mode  with
     ``shift'' keys stops you from unshifting upon release of the
     key!

TT    Typematic: generate an  interrupt when the key is depressed,
     and generate subsequent  key-depression interrupts while the
     key  is  depressed.    The  rate  at  which  interrupts  are
     generated  is  specified   by  the  typematic  rate  of  the
     keyboard.    This  type   is  usually   associated   with  a
     ``regular'' key.

MMBB   Make/Break: generate an interrupt when the key is depressed,
     and  when  it is  released.   No  additional interrupts  are
     generated  no matter  how long the  key is  depressed.  This
     mode is used for ``shift'' keys.

TTMMBB  Typematic/Make/Break: generate an  interrupt when the key is
     first   depressed;   generate   subsequent  key   depression
     interrupts while the  key remains depressed; and generate an
     interrupt when the key is released.

The last  sub-field of kk_ffllaaggss  specifies the _l_o_c_k  keys, if any,
that affect the specified key:

CC    The ccaappss  lock key that affects this  key.  If the specified
     key is depressed while ccaappss lock is active, it is equivalent
     to having used either of the SHIFT keys with this key.  When
     ccaappss  lock is  in effect,  use of either  of the  SHIFT keys
     temporarily toggles the state of the ccaappss lock.

NN    The nnuumm lock key affects  this key.  If the specified key is
     depressed  while nnuumm  lock is  active,  it is  equivalent to
     having used either of the SHIFT keys in conjunction with the
     specified key.  When nnuumm lock is in effect, use of either of
     the  SHIFT keys  temporarily toggles  the  state of  the nnuumm


COHERENT Lexicon                                           Page 3




nkb                       Device Driver                       nkb



     lock.

***** References  ***** _T_e_c_h_n_i_c_a_l _R_e_f_e_r_e_n_c_e _f_o_r  _t_h_e _I_B_M _P_e_r_s_o_n_a_l
_C_o_m_p_u_t_e_r _A_T, IBM Corporation, 1984.

_M_u_l_t_i-_F_u_n_c_t_i_o_n  _K_e_y_b_o_a_r_d_s:  _L_a_y_o_u_t_s,  Cherry Electrical  Products
Corp.

***** See Also *****

ddeevviiccee ddrriivveerrss, ffnnkkeeyy, kkeeyybbooaarrdd ttaabblleess














































COHERENT Lexicon                                           Page 4



unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.