1 /* $NetBSD: pcconstab.US,v 1.1.30.3 2004/09/21 13:21:07 skrll Exp $ */
4 * Copyright (c) 1990, 1993
5 * The Regents of the University of California. All rights reserved.
7 * This code is derived from software contributed to Berkeley by
8 * William Jolitz and Don Ahn.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the name of the University nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * @(#)pccons.c 8.1 (Berkeley) 6/11/93
38 * US Keyboard mapping tables
40 const unsigned short action[] = {
41 0, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, /* scan 0- 7 */
42 ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, /* scan 8-15 */
43 ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, /* scan 16-23 */
44 ASCII, ASCII, ASCII, ASCII, ASCII, CTL, ASCII, ASCII, /* scan 24-31 */
45 ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, /* scan 32-39 */
46 ASCII, ASCII, SHF, ASCII, ASCII, ASCII, ASCII, ASCII, /* scan 40-47 */
47 ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, SHF, ASCII, /* scan 48-55 */
48 ALT, ASCII, CPS, FUNC, FUNC, FUNC, FUNC, FUNC, /* scan 56-63 */
49 FUNC, FUNC, FUNC, FUNC, FUNC, NUM,SCROLL, ASCII, /* scan 64-71 */
50 ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, ASCII, /* scan 72-79 */
51 ASCII, ASCII, ASCII, ASCII, 0, 0, 0, 0, /* scan 80-87 */
52 0,0,0,0,0,0,0,0, /* scan 88-95 */
53 0,0,0,0,0,0,0,0, /* scan 96-103 */
54 0,0,0,0,0,0,0,0, /* scan 104-111 */
55 0,0,0,0,0,0,0,0, /* scan 112-119 */
56 0,0,0,0,0,0,0,0, /* scan 120-127 */
59 const unsigned char unshift[] = { /* no shift */
60 0, 033, '1', '2', '3', '4', '5', '6', /* scan 0- 7 */
61 '7', '8', '9', '0', '-', '=', 010, '\t', /* scan 8-15 */
62 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', /* scan 16-23 */
63 'o', 'p', '[', ']', '\r', CTL, 'a', 's', /* scan 24-31 */
64 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', /* scan 32-39 */
65 '\'', '`', SHF, '\\', 'z', 'x', 'c', 'v', /* scan 40-47 */
66 'b', 'n', 'm', ',', '.', '/', SHF, '*', /* scan 48-55 */
67 ALT, ' ', CPS, 1, 2, 3, 4, 5, /* scan 56-63 */
68 6, 7, 8, 9, 10, NUM, STP, '7', /* scan 64-71 */
69 '8', '9', '-', '4', '5', '6', '+', '1', /* scan 72-79 */
70 '2', '3', '0', 0177, 0, 0, 0, 0, /* scan 80-87 */
71 0,0,0,0,0,0,0,0, /* scan 88-95 */
72 0,0,0,0,0,0,0,0, /* scan 96-103 */
73 0,0,0,0,0,0,0,0, /* scan 104-111 */
74 0,0,0,0,0,0,0,0, /* scan 112-119 */
75 0,0,0,0,0,0,0,0, /* scan 120-127 */
78 const unsigned char shift[] = { /* shift shift */
79 0, 033, '!', '@', '#', '$', '%', '^', /* scan 0- 7 */
80 '&', '*', '(', ')', '_', '+', 010, '\t', /* scan 8-15 */
81 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', /* scan 16-23 */
82 'O', 'P', '{', '}', '\r', CTL, 'A', 'S', /* scan 24-31 */
83 'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', /* scan 32-39 */
84 '"', '~', SHF, '|', 'Z', 'X', 'C', 'V', /* scan 40-47 */
85 'B', 'N', 'M', '<', '>', '?', SHF, '*', /* scan 48-55 */
86 ALT, ' ', CPS, 0, 0, ' ', 0, 0, /* scan 56-63 */
87 0, 0, 0, 0, 0, NUM, STP, '7', /* scan 64-71 */
88 '8', '9', '-', '4', '5', '6', '+', '1', /* scan 72-79 */
89 '2', '3', '0', 0177, 0, 0, 0, 0, /* scan 80-87 */
90 0,0,0,0,0,0,0,0, /* scan 88-95 */
91 0,0,0,0,0,0,0,0, /* scan 96-103 */
92 0,0,0,0,0,0,0,0, /* scan 104-111 */
93 0,0,0,0,0,0,0,0, /* scan 112-119 */
94 0,0,0,0,0,0,0,0, /* scan 120-127 */
97 const unsigned char ctl[] = { /* CTL shift */
98 0, 033, '!', 000, '#', '$', '%', 036, /* scan 0- 7 */
99 '&', '*', '(', ')', 037, '+', 034,'\177', /* scan 8-15 */
100 021, 027, 005, 022, 024, 031, 025, 011, /* scan 16-23 */
101 017, 020, 033, 035, '\r', CTL, 001, 023, /* scan 24-31 */
102 004, 006, 007, 010, 012, 013, 014, ';', /* scan 32-39 */
103 '\'', '`', SHF, 034, 032, 030, 003, 026, /* scan 40-47 */
104 002, 016, 015, '<', '>', '?', SHF, '*', /* scan 48-55 */
105 ALT, ' ', CPS, 0, 0, ' ', 0, 0, /* scan 56-63 */
106 CPS, 0, 0, 0, 0, 0, 0, 0, /* scan 64-71 */
107 0, 0, 0, 0, 0, 0, 0, 0, /* scan 72-79 */
108 0, 0, 0, 0177, 0, 0, 0, 0, /* scan 80-87 */
109 0, 0, 033, '7', '4', '1', 0, NUM, /* scan 88-95 */
110 '8', '5', '2', 0, STP, '9', '6', '3', /* scan 96-103*/
111 '.', 0, '*', '-', '+', 0, 0, 0, /*scan 104-111*/
112 0,0,0,0,0,0,0,0, /* scan 112-119 */
113 0,0,0,0,0,0,0,0, /* scan 120-127 */