|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights ! 7: * Reserved. This file contains Original Code and/or Modifications of ! 8: * Original Code as defined in and that are subject to the Apple Public ! 9: * Source License Version 1.1 (the "License"). You may not use this file ! 10: * except in compliance with the License. Please obtain a copy of the ! 11: * License at http://www.apple.com/publicsource and read it before using ! 12: * this file. ! 13: * ! 14: * The Original Code and all software distributed under the License are ! 15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 19: * License for the specific language governing rights and limitations ! 20: * under the License. ! 21: * ! 22: * @APPLE_LICENSE_HEADER_END@ ! 23: */ ! 24: ! 25: /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. ! 26: * ! 27: * keycodes.h ! 28: * ! 29: * HISTORY ! 30: * 04 April 97 Simon Douglas ! 31: * Created based on previous versions. ! 32: * ! 33: */ ! 34: ! 35: #ifdef KERNEL_PRIVATE ! 36: ! 37: #ifndef _KEYCODES_ ! 38: #define _KEYCODES_ ! 39: ! 40: #define nul 0x000 ! 41: #define soh 0x001 ! 42: #define stx 0x002 ! 43: #define etx 0x003 ! 44: #define eot 0x004 ! 45: #define enq 0x005 ! 46: #define ack 0x006 ! 47: #define bel 0x007 ! 48: #define bs 0x008 ! 49: #define ht 0x009 ! 50: #define nl 0x00a ! 51: #define vt 0x00b ! 52: #define np 0x00c ! 53: #define cr 0x00d ! 54: #define so 0x00e ! 55: #define si 0x00f ! 56: #define dle 0x010 ! 57: #define dc1 0x011 ! 58: #define dc2 0x012 ! 59: #define dc3 0x013 ! 60: #define dc4 0x014 ! 61: #define nak 0x015 ! 62: #define syn 0x016 ! 63: #define etb 0x017 ! 64: #define can 0x018 ! 65: #define em 0x019 ! 66: #define sub 0x01a ! 67: #define esc 0x01b ! 68: #define fs 0x01c ! 69: #define gs 0x01d ! 70: #define rs 0x01e ! 71: #define us 0x01f ! 72: #define del 0x07f ! 73: #define inv 0x100 /* invalid key code */ ! 74: #define dim 0x101 ! 75: #define quiet 0x102 ! 76: #define left 0x103 ! 77: #define down 0x104 ! 78: #define right 0x105 ! 79: #define up 0x106 ! 80: #define bright 0x107 ! 81: #define loud 0x108 ! 82: #define mouse_l 0x109 ! 83: #define ret '\r' ! 84: #define tab '\t' ! 85: ! 86: // The following table maps scancodes from the ADB keyboard into ascii ! 87: // characters. Each two entries in the table represent a single character. ! 88: // The first value is used whn the shift key is NOT pressed. The second ! 89: // value is used wheh the shift key IS preseed. This consumes the first ! 90: // _N_KEYCODES * 2 entries in the table. After that, there are another ! 91: // _N_KEYCODES * 2 entries that represent the ascii to use for the given ! 92: // keycode when the control key is pressed. ! 93: ! 94: #define _N_KEYCODES 0x80 ! 95: u_short keycodeToAscii[_N_KEYCODES * 4] = { ! 96: // The following entries represent the non-control keys and their ! 97: // shift values (in that order). Each pair of entries represents 1 key. ! 98: ! 99: 'a', 'A', 's', 'S', 'd', 'D', 'f', 'F', // 00-03 ! 100: 'h', 'H', 'g', 'G', 'z', 'Z', 'x', 'X', // 04-07 ! 101: 'c', 'C', 'v', 'V', inv, inv, 'b', 'B', // 08-0B ! 102: 'q', 'Q', 'w', 'W', 'e', 'E', 'r', 'R', // 0C-0F ! 103: 'y', 'Y', 't', 'T', '1', '!', '2', '@', // 10-13 ! 104: '3', '#', '4', '$', '6', '^', '5', '%', // 14-17 ! 105: '=', '+', '9', '(', '7', '&', '-', '_', // 18-1B ! 106: '8', '*', '0', ')', ']', '}', 'o', 'O', // 1C-1F ! 107: 'u', 'U', '[', '{', 'i', 'I', 'p', 'P', // 20-23 ! 108: ret, ret, 'l', 'L', 'j', 'J', '\'', '"', // 24-27 ! 109: 'k', 'K', ';', ':', '\\', '|', ',', '<', // 28-2B ! 110: '/', '?', 'n', 'N', 'm', 'M', '.', '>', // 2C-2F ! 111: tab, tab, ' ', ' ', '`', '~', del, bs, // 30-33 ! 112: inv, inv, esc, esc, inv, inv, inv, inv, // 34-37 ! 113: inv, inv, inv, inv, inv, inv, left, left, // 38-3B ! 114: right, right, down, down, up, up, inv, inv, // 3C-3F ! 115: inv, inv, '.', '.', inv, inv, '*', '*', // 40-43 ! 116: inv, inv, '+', '+', inv, inv, inv, inv, // 44-47 ! 117: inv, inv, inv, inv, inv, inv, '/', '/', // 48-4B ! 118: ret, ret, inv, inv, '-', '-', inv, inv, // 4C-4F ! 119: inv, inv, '=', '=', '0', '0', '1', '1', // 50-53 ! 120: '2', '2', '3', '3', '4', '4', '5', '5', // 54-57 ! 121: '6', '6', '7', '7', inv, inv, '8', '8', // 58-5B ! 122: '9', '9', inv, inv, inv, inv, inv, inv, // 5C-5F ! 123: inv, inv, inv, inv, inv, inv, inv, inv, // 60-63 ! 124: inv, inv, inv, inv, inv, inv, inv, inv, // 64-67 ! 125: inv, inv, inv, inv, inv, inv, inv, inv, // 68-6B ! 126: inv, inv, inv, inv, inv, inv, inv, inv, // 6C-6F ! 127: inv, inv, inv, inv, inv, inv, inv, inv, // 70-73 ! 128: inv, inv, inv, inv, inv, inv, inv, inv, // 74-77 ! 129: inv, inv, inv, inv, inv, inv, inv, inv, // 78-7B ! 130: inv, inv, inv, inv, inv, inv, inv, inv, // 7C-7F ! 131: ! 132: // The following entries represent the control and control-shift ! 133: // keys (in that order). Each pair of entries represents 1 key. ! 134: ! 135: soh, soh, dc3, dc3, eot, eot, ack, ack, // 00-03 ! 136: bs, bs, bel, bel, sub, sub, can, can, // 04-07 ! 137: etx, etx, syn, syn, inv, inv, stx, stx, // 08-0B ! 138: dc1, dc1, etb, etb, enq, enq, dc2, dc2, // 0C-0F ! 139: em, em, dc4, dc4, '1', '!', nul, nul, // 10-13 ! 140: '3', '#', '4', '$', rs, rs, '5', '%', // 14-17 ! 141: '=', '+', '9', '(', '7', '&', us, us, // 18-1B ! 142: '8', '*', '0', ')', fs, fs, si, si, // 1C-1F ! 143: nak, nak, esc, esc, ht, ht, dle, dle, // 20-23 ! 144: ret, ret, np, np, nl, nl, '\'', '"', // 24-27 ! 145: vt, vt, ';', ':', fs, fs, ',', '<', // 28-2B ! 146: '/', '?', so, so, cr, cr, '.', '>', // 2C-2F ! 147: tab, tab, nul, nul, '`', '~', quiet, quiet, // 30-33(del) ! 148: inv, inv, esc, esc, inv, inv, inv, inv, // 34-37 ! 149: inv, inv, inv, inv, inv, inv, left, left, // 38-3B ! 150: right, right, down, down, up, up, inv, inv, // 3C-3F ! 151: inv, inv, '.', '.', inv, inv, '*', '*', // 40-43 ! 152: inv, inv, '+', '+', inv, inv, inv, inv, // 44-47 ! 153: inv, inv, inv, inv, inv, inv, '/', '/', // 48-4B ! 154: ret, ret, inv, inv, '-', '-', inv, inv, // 4C-4F ! 155: inv, inv, '=', '=', '0', '0', '1', '1', // 50-53 ! 156: '2', '2', '3', '3', '4', '4', '5', '5', // 54-57 ! 157: '6', '6', '7', '7', inv, inv, '8', '8', // 58-5B ! 158: '9', '9', inv, inv, inv, inv, inv, inv, // 5C-5F ! 159: inv, inv, inv, inv, inv, inv, inv, inv, // 60-63 ! 160: inv, inv, inv, inv, inv, inv, inv, inv, // 64-67 ! 161: inv, inv, inv, inv, inv, inv, inv, inv, // 68-6B ! 162: inv, inv, inv, inv, inv, inv, inv, inv, // 6C-6F ! 163: inv, inv, inv, inv, inv, inv, inv, inv, // 70-73 ! 164: inv, inv, inv, inv, inv, inv, inv, inv, // 74-77 ! 165: inv, inv, inv, inv, inv, inv, inv, inv, // 78-7B ! 166: inv, inv, inv, inv, inv, inv, inv, inv // 7C-7F ! 167: }; ! 168: ! 169: #endif /* _KEYCODES_ */ ! 170: ! 171: #endif /* KERNEL_PRIVATE */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.