[BACK]Return to keyboard.h CVS log [TXT][DIR] Up to [local] / sys / arch / mac68k / include

Annotation of sys/arch/mac68k/include/keyboard.h, Revision 1.1.1.1

1.1       nbrk        1: /*     $OpenBSD: keyboard.h,v 1.6 2006/01/04 20:39:05 miod Exp $       */
                      2: /*     $NetBSD: keyboard.h,v 1.1 1998/05/15 10:15:54 tsubai Exp $      */
                      3:
                      4: /*-
                      5:  * Copyright (C) 1993  Allen K. Briggs, Chris P. Caputo,
                      6:  *                     Michael L. Finch, Bradley A. Grantham, and
                      7:  *                     Lawrence A. Kesteloot
                      8:  * All rights reserved.
                      9:  *
                     10:  * Redistribution and use in source and binary forms, with or without
                     11:  * modification, are permitted provided that the following conditions
                     12:  * are met:
                     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. All advertising materials mentioning features or use of this software
                     19:  *    must display the following acknowledgement:
                     20:  *     This product includes software developed by the Alice Group.
                     21:  * 4. The names of the Alice Group or any of its members may not be used
                     22:  *    to endorse or promote products derived from this software without
                     23:  *    specific prior written permission.
                     24:  *
                     25:  * THIS SOFTWARE IS PROVIDED BY THE ALICE GROUP ``AS IS'' AND ANY EXPRESS OR
                     26:  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
                     27:  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
                     28:  * IN NO EVENT SHALL THE ALICE GROUP BE LIABLE FOR ANY DIRECT, INDIRECT,
                     29:  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
                     30:  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
                     31:  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
                     32:  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                     33:  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
                     34:  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
                     35:  */
                     36:
                     37: #define ADBK_LEFT      0x3B
                     38: #define ADBK_RIGHT     0x3C
                     39: #define ADBK_UP                0x3E
                     40: #define ADBK_DOWN      0x3D
                     41: #define ADBK_PGUP      0x74
                     42: #define ADBK_PGDN      0x79
                     43: #define ADBK_HOME      0x73
                     44: #define ADBK_END       0x77
                     45: #define ADBK_CONTROL   0x36
                     46: #define ADBK_FLOWER    0x37
                     47: #define ADBK_SHIFT     0x38
                     48: #define ADBK_CAPSLOCK  0x39
                     49: #define ADBK_OPTION    0x3A
                     50: #define ADBK_F         0x03
                     51: #define ADBK_O         0x1F
                     52: #define ADBK_P         0x23
                     53: #define ADBK_Q         0x0C
                     54: #define ADBK_V         0x09
                     55: #define ADBK_1         0x12
                     56: #define ADBK_2         0x13
                     57: #define ADBK_3         0x14
                     58: #define ADBK_4         0x15
                     59: #define ADBK_5         0x17
                     60: #define ADBK_6         0x16
                     61: #define ADBK_7         0x1A
                     62: #define ADBK_8         0x1C
                     63: #define ADBK_9         0x19
                     64: #define ADBK_0         0x1D
                     65:
                     66: #define ADBK_KEYVAL(key)       ((key) & 0x7f)
                     67: #define ADBK_PRESS(key)                (((key) & 0x80) == 0)
                     68: #define ADBK_KEYDOWN(key)      (key)
                     69: #define ADBK_KEYUP(key)                ((key) | 0x80)
                     70: #define ADBK_MODIFIER(key)     ((((key) & 0x7f) == ADBK_SHIFT) || \
                     71:                                 (((key) & 0x7f) == ADBK_CONTROL) || \
                     72:                                 (((key) & 0x7f) == ADBK_FLOWER) || \
                     73:                                 (((key) & 0x7f) == ADBK_OPTION))
                     74:
                     75: #ifndef KEYBOARD_ARRAY
                     76: extern unsigned char keyboard[128][4];
                     77: #else
                     78: unsigned char keyboard[128][4] = {
                     79:          /* Scan code      Normal     Shifted     Controlled   XT */
                     80:        { /*   0x00, */       'a',       'A',         0x01,      30 },
                     81:        { /*   0x01, */       's',       'S',         0x13,      31 },
                     82:        { /*   0x02, */       'd',       'D',         0x04,      32 },
                     83:        { /*   0x03, */       'f',       'F',         0x06,      33 },
                     84:        { /*   0x04, */       'h',       'H',         0x08,      35 },
                     85:        { /*   0x05, */       'g',       'G',         0x07,      34 },
                     86:        { /*   0x06, */       'z',       'Z',         0x1A,      44 },
                     87:        { /*   0x07, */       'x',       'X',         0x18,      45 },
                     88:        { /*   0x08, */       'c',       'C',         0x03,      46 },
                     89:        { /*   0x09, */       'v',       'V',         0x16,      47 },
                     90: #ifdef FIX_SV_X_KBDBUG
                     91:        { /*   0x0A, */      0x00,      0x00,         0x00,      41 },
                     92: #else
                     93:        { /*   0x0A, */      0x00,      0x00,         0x00,      86 },
                     94: #endif
                     95:        { /*   0x0B, */       'b',       'B',         0x02,      48 },
                     96:        { /*   0x0C, */       'q',       'Q',         0x11,      16 },
                     97:        { /*   0x0D, */       'w',       'W',         0x17,      17 },
                     98:        { /*   0x0E, */       'e',       'E',         0x05,      18 },
                     99:        { /*   0x0F, */       'r',       'R',         0x12,      19 },
                    100:        { /*   0x10, */       'y',       'Y',         0x19,      21 },
                    101:        { /*   0x11, */       't',       'T',         0x14,      20 },
                    102:        { /*   0x12, */       '1',       '!',         0x00,       2 },
                    103:        { /*   0x13, */       '2',       '@',         0x00,       3 },
                    104:        { /*   0x14, */       '3',       '#',         0x00,       4 },
                    105:        { /*   0x15, */       '4',       '$',         0x00,       5 },
                    106:        { /*   0x16, */       '6',       '^',         0x1E,       7 },
                    107:        { /*   0x17, */       '5',       '%',         0x00,       6 },
                    108:        { /*   0x18, */       '=',       '+',         0x00,      13 },
                    109:        { /*   0x19, */       '9',       '(',         0x00,      10 },
                    110:        { /*   0x1A, */       '7',       '&',         0x00,       8 },
                    111:        { /*   0x1B, */       '-',       '_',         0x1F,      12 },
                    112:        { /*   0x1C, */       '8',       '*',         0x00,       9 },
                    113:        { /*   0x1D, */       '0',       ')',         0x00,      11 },
                    114:        { /*   0x1E, */       ']',       '}',         0x1D,      27 },
                    115:        { /*   0x1F, */       'o',       'O',         0x0F,      24 },
                    116:        { /*   0x20, */       'u',       'U',         0x15,      22 },
                    117:        { /*   0x21, */       '[',       '{',         0x1B,      26 },
                    118:        { /*   0x22, */       'i',       'I',         0x09,      23 },
                    119:        { /*   0x23, */       'p',       'P',         0x10,      25 },
                    120:        { /*   0x24, */      0x0D,      0x0D,         0x0D,      28 },
                    121:        { /*   0x25, */       'l',       'L',         0x0C,      38 },
                    122:        { /*   0x26, */       'j',       'J',         0x0A,      36 },
                    123:        { /*   0x27, */       '\'',      '"',         0x00,      40 },
                    124:        { /*   0x28, */       'k',       'K',         0x0B,      37 },
                    125:        { /*   0x29, */       ';',       ':',         0x00,      39 },
                    126:        { /*   0x2A, */      '\\',       '|',         0x1C,      43 },
                    127:        { /*   0x2B, */       ',',       '<',         0x00,      51 },
                    128:        { /*   0x2C, */       '/',       '?',         0x00,      53 },
                    129:        { /*   0x2D, */       'n',       'N',         0x0E,      49 },
                    130:        { /*   0x2E, */       'm',       'M',         0x0D,      50 },
                    131:        { /*   0x2F, */       '.',       '>',         0x00,      52 },
                    132:        { /*   0x30, */      0x09,      0x09,         0x09,      15 },
                    133:        { /*   0x31, */       ' ',       ' ',         0x00,      57 },
                    134: #ifdef FIX_SV_X_KBDBUG
                    135:        { /*   0x32, */       '`',       '~',         0x00,      86 },
                    136: #else
                    137:        { /*   0x32, */       '`',       '~',         0x00,      41 },
                    138: #endif
                    139:        { /*   0x33, */      0x7F,      0x7F,         0x7F,     211 }, /* Delete */
                    140:        { /*   0x34, */      0x00,      0x00,         0x00,     105 }, /* MODE/KP_Enter */
                    141:        { /*   0x35, */      0x1B,      0x1B,         0x1B,       1 },
                    142:        { /*   0x36, */      0x00,      0x00,         0x00,      29 },
                    143:        { /*   0x37, */      0x00,      0x00,         0x00,     219 },
                    144:        { /*   0x38, */      0x00,      0x00,         0x00,      42 },
                    145:        { /*   0x39, */      0x00,      0x00,         0x00,      58 },
                    146:        { /*   0x3A, */      0x00,      0x00,         0x00,      56 }, /* L Alt */
                    147:        { /*   0x3B, */       'h',      0x00,         0x00,     203 },  /* Left */
                    148:        { /*   0x3C, */       'l',      0x00,         0x00,     205 },  /* Right */
                    149:        { /*   0x3D, */       'j',      0x00,         0x00,     208 },  /* Down */
                    150:        { /*   0x3E, */       'k',      0x00,         0x00,     200 },  /* Up */
                    151:        { /*   0x3F, */      0x00,      0x00,         0x00,       0 }, /* Fn */
                    152:        { /*   0x40, */      0x00,      0x00,         0x00,       0 },
                    153:        { /*   0x41, */       '.',       '.',         0x00,      83 },
                    154:        { /*   0x42, */      0x00,      0x00,         0x00,       0 },
                    155:        { /*   0x43, */       '*',       '*',         0x00,      55 },
                    156:        { /*   0x44, */      0x00,      0x00,         0x00,       0 },
                    157:        { /*   0x45, */       '+',       '+',         0x00,      78 },
                    158:        { /*   0x46, */      0x00,      0x00,         0x00,       0 },
                    159:        { /*   0x47, */      0x00,      0x00,         0x00,      69 },
                    160:        { /*   0x48, */      0x00,      0x00,         0x00,       0 },
                    161:        { /*   0x49, */      0x00,      0x00,         0x00,       0 },
                    162:        { /*   0x4A, */      0x00,      0x00,         0x00,       0 },
                    163:        { /*   0x4B, */       '/',       '/',         0x00,     181 },
                    164:        { /*   0x4C, */      0x0D,      0x0D,         0x0D,     156 },
                    165:        { /*   0x4D, */      0x00,      0x00,         0x00,       0 },
                    166:        { /*   0x4E, */       '-',       '-',         0x00,      74 },
                    167:        { /*   0x4F, */      0x00,      0x00,         0x00,       0 },
                    168:        { /*   0x50, */      0x00,      0x00,         0x00,       0 },
                    169:        { /*   0x51, */       '=',       '=',         0x00,     118 },
                    170:        { /*   0x52, */       '0',       '0',         0x00,      82 },
                    171:        { /*   0x53, */       '1',       '1',         0x00,      79 },
                    172:        { /*   0x54, */       '2',       '2',         0x00,      80 },
                    173:        { /*   0x55, */       '3',       '3',         0x00,      81 },
                    174:        { /*   0x56, */       '4',       '4',         0x00,      75 },
                    175:        { /*   0x57, */       '5',       '5',         0x00,      76 },
                    176:        { /*   0x58, */       '6',       '6',         0x00,      77 },
                    177:        { /*   0x59, */       '7',       '7',         0x00,      71 },
                    178:        { /*   0x5A, */      0x00,      0x00,         0x00,       0 },
                    179:        { /*   0x5B, */       '8',       '8',         0x00,      72 },
                    180:        { /*   0x5C, */       '9',       '9',         0x00,      73 },
                    181:        { /*   0x5D, */      0x00,      0x00,         0x00,       0 },
                    182:        { /*   0x5E, */      0x00,      0x00,         0x00,       0 },
                    183:        { /*   0x5F, */      0x00,      0x00,         0x00,      51 },
                    184:        { /*   0x60, */      0x00,      0x00,         0x00,      63 }, /* F5 */
                    185:        { /*   0x61, */      0x00,      0x00,         0x00,      64 }, /* F6 */
                    186:        { /*   0x62, */      0x00,      0x00,         0x00,      65 }, /* F7 */
                    187:        { /*   0x63, */      0x00,      0x00,         0x00,      61 }, /* F3 */
                    188:        { /*   0x64, */      0x00,      0x00,         0x00,      66 }, /* F8 */
                    189:        { /*   0x65, */      0x00,      0x00,         0x00,      67 }, /* F9 */
                    190:        { /*   0x66, */      0x00,      0x00,         0x00,       0 },
                    191:        { /*   0x67, */      0x00,      0x00,         0x00,      87 }, /* F11 */
                    192:        { /*   0x68, */      0x00,      0x00,         0x00,       0 },
                    193:        { /*   0x69, */      0x00,      0x00,         0x00,       0 },
                    194:        { /*   0x6A, */      0x00,      0x00,         0x00,     156 },
                    195:        { /*   0x6B, */      0x00,      0x00,         0x00,       0 },
                    196:        { /*   0x6C, */      0x00,      0x00,         0x00,       0 },
                    197:        { /*   0x6D, */      0x00,      0x00,         0x00,      68 }, /* F10 */
                    198:        { /*   0x6E, */      0x00,      0x00,         0x00,       0 },
                    199:        { /*   0x6F, */      0x00,      0x00,         0x00,      88 }, /* F12 */
                    200:        { /*   0x70, */      0x00,      0x00,         0x00,       0 },
                    201:        { /*   0x71, */      0x00,      0x00,         0x00,       0 },
                    202:        { /*   0x72, */      0x00,      0x00,         0x00,       0 },
                    203:        { /*   0x73, */      0x00,      0x00,         0x00,     199 },
                    204:        { /*   0x74, */      0x00,      0x00,         0x00,     201 },
                    205:        { /*   0x75, */      0x00,      0x00,         0x00,       0 },
                    206:        { /*   0x76, */      0x00,      0x00,         0x00,      62 }, /* F4 */
                    207:        { /*   0x77, */      0x00,      0x00,         0x00,     207 },
                    208:        { /*   0x78, */      0x00,      0x00,         0x00,      60 }, /* F2 */
                    209:        { /*   0x79, */      0x00,      0x00,         0x00,     209 },
                    210:        { /*   0x7A, */      0x00,      0x00,         0x00,      59 }, /* F1 */
                    211:        { /*   0x7B, */      0x00,      0x00,         0x00,       0 },
                    212:        { /*   0x7C, */      0x00,      0x00,         0x00,       0 },
                    213:        { /*   0x7D, */      0x00,      0x00,         0x00,       0 },
                    214:        { /*   0x7E, */      0x00,      0x00,         0x00,       0 },
                    215:        { /*   0x7F, */      0x00,      0x00,         0x00,       0 } /* pwr */
                    216: };
                    217: #endif /* KEYBOARD_ARRAY */

CVSweb