/*      $NetBSD: pcconstab.US,v 1.3 2005/12/11 12:18:48 christos Exp $  */

/*-
* Copyright (c) 1990, 1993
*      The Regents of the University of California.  All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* William Jolitz and Don Ahn.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
*    notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
*    notice, this list of conditions and the following disclaimer in the
*    documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
*    may be used to endorse or promote products derived from this software
*    without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*      @(#)pccons.c    8.1 (Berkeley) 6/11/93
*/

/*
*      US Keyboard mapping tables
*/
const unsigned short action[] = {
       0,     ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, /* scan  0- 7 */
       ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, /* scan  8-15 */
       ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, /* scan 16-23 */
       ASCII, ASCII, ASCII, ASCII, ASCII,   CTL, ASCII, ASCII, /* scan 24-31 */
       ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, /* scan 32-39 */
       ASCII, ASCII,   SHF, ASCII, ASCII, ASCII, ASCII, ASCII, /* scan 40-47 */
       ASCII, ASCII, ASCII, ASCII, ASCII, ASCII,   SHF, ASCII, /* scan 48-55 */
         ALT, ASCII,   CPS,  FUNC,  FUNC,  FUNC,  FUNC,  FUNC, /* scan 56-63 */
        FUNC,  FUNC,  FUNC,  FUNC,  FUNC,   NUM,SCROLL, ASCII, /* scan 64-71 */
       ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, /* scan 72-79 */
       ASCII, ASCII, ASCII, ASCII,     0,     0,     0,     0, /* scan 80-87 */
       0,0,0,0,0,0,0,0,        /* scan 88-95 */
       0,0,0,0,0,0,0,0,        /* scan 96-103 */
       0,0,0,0,0,0,0,0,        /* scan 104-111 */
       0,0,0,0,0,0,0,0,        /* scan 112-119 */
       0,0,0,0,0,0,0,0,        /* scan 120-127 */
};

const unsigned char unshift[] = {       /* no shift */
         0,   033,   '1',   '2',   '3',   '4',   '5',   '6',   /* scan  0- 7 */
       '7',   '8',   '9',   '0',   '-',   '=',   010,  '\t',   /* scan  8-15 */
       'q',   'w',   'e',   'r',   't',   'y',   'u',   'i',   /* scan 16-23 */
       'o',   'p',   '[',   ']',  '\r',   CTL,   'a',   's',   /* scan 24-31 */
       'd',   'f',   'g',   'h',   'j',   'k',   'l',   ';',   /* scan 32-39 */
       '\'',  '`',   SHF,   '\\',  'z',   'x',   'c',   'v',   /* scan 40-47 */
       'b',   'n',   'm',   ',',   '.',   '/',   SHF,   '*',   /* scan 48-55 */
       ALT,   ' ',   CPS,     1,     2,     3,     4,     5,   /* scan 56-63 */
         6,     7,     8,     9,    10,   NUM,   STP,   '7',   /* scan 64-71 */
       '8',   '9',   '-',   '4',   '5',   '6',   '+',   '1',   /* scan 72-79 */
       '2',   '3',   '0',   0177,    0,     0,     0,     0,   /* scan 80-87 */
       0,0,0,0,0,0,0,0,        /* scan 88-95 */
       0,0,0,0,0,0,0,0,        /* scan 96-103 */
       0,0,0,0,0,0,0,0,        /* scan 104-111 */
       0,0,0,0,0,0,0,0,        /* scan 112-119 */
       0,0,0,0,0,0,0,0,        /* scan 120-127 */
};

const unsigned char shift[] = { /* shift shift */
         0,   033,   '!',   '@',   '#',   '$',   '%',   '^',   /* scan  0- 7 */
       '&',   '*',   '(',   ')',   '_',   '+',   010,  '\t',   /* scan  8-15 */
       'Q',   'W',   'E',   'R',   'T',   'Y',   'U',   'I',   /* scan 16-23 */
       'O',   'P',   '{',   '}',  '\r',   CTL,   'A',   'S',   /* scan 24-31 */
       'D',   'F',   'G',   'H',   'J',   'K',   'L',   ':',   /* scan 32-39 */
       '"',   '~',   SHF,   '|',   'Z',   'X',   'C',   'V',   /* scan 40-47 */
       'B',   'N',   'M',   '<',   '>',   '?',   SHF,   '*',   /* scan 48-55 */
       ALT,   ' ',   CPS,     0,     0,   ' ',     0,     0,   /* scan 56-63 */
         0,     0,     0,     0,     0,   NUM,   STP,   '7',   /* scan 64-71 */
       '8',   '9',   '-',   '4',   '5',   '6',   '+',   '1',   /* scan 72-79 */
       '2',   '3',   '0',  0177,     0,     0,     0,     0,   /* scan 80-87 */
       0,0,0,0,0,0,0,0,        /* scan 88-95 */
       0,0,0,0,0,0,0,0,        /* scan 96-103 */
       0,0,0,0,0,0,0,0,        /* scan 104-111 */
       0,0,0,0,0,0,0,0,        /* scan 112-119 */
       0,0,0,0,0,0,0,0,        /* scan 120-127 */
};

const unsigned char ctl[] = {   /* CTL shift */
         0,   033,   '!',   000,   '#',   '$',   '%',   036,   /* scan  0- 7 */
       '&',   '*',   '(',   ')',   037,   '+',   034,'\177',   /* scan  8-15 */
       021,   027,   005,   022,   024,   031,   025,   011,   /* scan 16-23 */
       017,   020,   033,   035,  '\r',   CTL,   001,   023,   /* scan 24-31 */
       004,   006,   007,   010,   012,   013,   014,   ';',   /* scan 32-39 */
       '\'',  '`',   SHF,   034,   032,   030,   003,   026,   /* scan 40-47 */
       002,   016,   015,   '<',   '>',   '?',   SHF,   '*',   /* scan 48-55 */
       ALT,   ' ',   CPS,     0,     0,   ' ',     0,     0,   /* scan 56-63 */
       CPS,     0,     0,     0,     0,     0,     0,     0,   /* scan 64-71 */
         0,     0,     0,     0,     0,     0,     0,     0,   /* scan 72-79 */
         0,     0,     0,  0177,     0,     0,     0,     0,   /* scan 80-87 */
         0,     0,   033,   '7',   '4',   '1',     0,   NUM,   /* scan 88-95 */
       '8',   '5',   '2',     0,   STP,   '9',   '6',   '3',   /* scan 96-103*/
       '.',     0,   '*',   '-',   '+',     0,     0,     0,   /*scan 104-111*/
       0,0,0,0,0,0,0,0,        /* scan 112-119 */
       0,0,0,0,0,0,0,0,        /* scan 120-127 */
};