1 /* 2 * Copyright 2008, Haiku Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Michael Lotz <mmlr@mlotz.ch> 7 * Darian Rackham 8 * Olivier Coursière 9 */ 10 #ifndef DEBUGGER_KEYMAPS_H 11 #define DEBUGGER_KEYMAPS_H 12 13 #define KDL_KEYMAP_DV 1 14 #define KDL_KEYMAP_FR 2 15 #define KDL_KEYMAP_IT 3 16 #define KDL_KEYMAP_SG 4 17 #define KDL_KEYMAP_US 5 18 19 #include "kernel_debugger_config.h" 20 21 #if KDL_KEYMAP == KDL_KEYMAP_DV 22 23 static const char kUnshiftedKeymap[128] = { 24 0, 27, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '[', ']', 8, '\t', 25 '\'', ',', '.', 'p', 'y', 'f', 'g', 'c', 'r', 'l', '/', '=', '\n', 0, 'a', 'o', 26 'e', 'u', 'i', 'd', 'h', 't', 'n', 's', '-', '`', 0, '\\', ';', 'q', 'j', 'k', 27 'x', 'b', 'm', 'w', 'v', 'z', 0, '*', 0, ' ', 0, 0, 0, 0, 0, 0, 28 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29 '\\', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 32 }; 33 34 static const char kShiftedKeymap[128] = { 35 0, 27, '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '{', '}', 8, '\t', 36 '"', '<', '>', 'P', 'Y', 'F', 'G', 'C', 'R', 'L', '?', '+', '\n', 0, 'A', 'O', 37 'E', 'U', 'I', 'D', 'H', 'T', 'N', 'S', '_', '~', 0, '|', ':', 'Q', 'J', 'K', 38 'X', 'B', 'M', 'W', 'V', 'Z', 0, '*', 0, ' ', 0, 0, 0, 0, 0, 0, 39 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40 '|', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 43 }; 44 45 static const char kAltedKeymap[128] = { 46 0, 27, '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '{', '}', 8, '\t', 47 '"', '<', '>', 'P', 'Y', 'F', 'G', 'C', 'R', 'L', '?', '+', '\n', 0, 'A', 'O', 48 'E', 'U', 'I', 'D', 'H', 'T', 'N', 'S', '_', '~', 0, '|', ':', 'Q', 'J', 'K', 49 'X', 'B', 'M', 'W', 'V', 'Z', 0, '*', 0, ' ', 0, 0, 0, 0, 0, 0, 50 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 54 }; 55 56 #elif KDL_KEYMAP == KDL_KEYMAP_FR 57 58 static const char kUnshiftedKeymap[128] = { 59 0, 27, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 0, '+', 8, '\t', 60 'a', 'z', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 0, '$', '\n', 0, 'q', 's', 61 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 0, '*', 0, '$', 'w', 'x', 'c', 'v', 62 'b', 'n', ',', ';', ':', '!', 0, '*', 0, ' ', 0, 0, 0, 0, 0, 0, 63 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '-', 0, 0, 0, '+', 0, 64 0, 0, 0, 0, 0, 0, '<', 0, 0, 0, 0, 0, 0, 0, 0, 0, 65 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 67 }; 68 69 static const char kShiftedKeymap[128] = { 70 0, 27, '&', 0, '"', '\'', '(', '-', 0, '_', 0, 0, ')', '=', 8, '\t', 71 'A', 'Z', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 0, 0, '\n', 0, 'Q', 'S', 72 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'M', '%', 0, 0, 0, 'W', 'X', 'C', 'V', 73 'B', 'N', '?', '.', '/', 0, 0, '*', 0, ' ', 0, 0, 0, 0, 0, 0, 74 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75 0, 0, 0, 0, 0, 0, '>', 0, 0, 0, 0, 0, 0, 0, 0, 0, 76 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 78 }; 79 80 static const char kAltedKeymap[128] = { 81 0, 27, 0, '~', '#', '{', '[', '|', '`', '\\', '^', '@', ']', '}', 8, '\t', 82 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84 0, 0, 0, 0, 0, 0, 0, '*', 0, ' ', 0, 0, 0, 0, 0, 0, 85 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86 0, 0, 0, 0, 0, 0, '\\', 0, 0, 0, 0, 0, 0, 0, 0, 0, 87 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 89 }; 90 91 #elif KDL_KEYMAP == KDL_KEYMAP_IT 92 93 static const char kUnshiftedKeymap[128] = { 94 0, 27, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '\'', '^', 8, '\t', 95 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 0, '+', '\n', 0, 'a', 's', 96 'd', 'f', 'g', 'h', 'j', 'k', 'l', 0, 0, '\\', 0, '<', 'z', 'x', 'c', 'v', 97 'b', 'n', 'm', ',', '.', '-', 0, 0, 0, ' ', 0, 0, 0, 0, 0, 0, 98 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 102 }; 103 104 static const char kShiftedKeymap[128] = { 105 0, 27, '!', '"', 0, '$', '%', '&', '/', '(', ')', '=', '?', '^', 8, '\t', 106 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 0, '*', '\n', 0, 'A', 'S', 107 'D', 'F', 'G', 'H', 'J', 'K', 'L', 0, 0, '|', 0, '>', 'Z', 'X', 'C', 'V', 108 'B', 'N', 'M', ';', ':', '_', 0, 0, 0, ' ', 0, 0, 0, 0, 0, 0, 109 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 113 }; 114 115 static const char kAltedKeymap[128] = { 116 0, 27, 0, 0, 0, 0, 0, 0, '|', 0, 0, 0, 0, '~', 8, '\t', 117 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '[', ']', 0, 0, 0, 0, 118 0, 0, 0, 0, 0, 0, 0, 0, '{', 0, 0, '}', 0, 0, 0, 0, 119 0, 0, 0, 0, 0, 0, 0, '*', 0, ' ', 0, 0, 0, 0, 0, 0, 120 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121 0, 0, 0, 0, 0, 0, '\\', 0, 0, 0, 0, 0, 0, 0, 0, 0, 122 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 124 }; 125 126 #elif KDL_KEYMAP == KDL_KEYMAP_SG 127 128 static const char kUnshiftedKeymap[128] = { 129 0, 27, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '\'', '^', 8, '\t', 130 'q', 'w', 'e', 'r', 't', 'z', 'u', 'i', 'o', 'p', 0, 0, '\n', 0, 'a', 's', 131 'd', 'f', 'g', 'h', 'j', 'k', 'l', 0, 0, 0, 0, '$', 'y', 'x', 'c', 'v', 132 'b', 'n', 'm', ',', '.', '-', 0, '*', 0, ' ', 0, 0, 0, 0, 0, 0, 133 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '-', 0, 0, 0, '+', 0, 134 0, 0, 0, 0, 0, 0, '<', 0, 0, 0, 0, 0, 0, 0, 0, 0, 135 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 137 }; 138 139 static const char kShiftedKeymap[128] = { 140 0, 27, '+', '"', '*', 0, '%', '&', '/', '(', ')', '=', '?', '`', 8, '\t', 141 'Q', 'W', 'E', 'R', 'T', 'Z', 'U', 'I', 'O', 'P', 0, '!', '\n', 0, 'A', 'S', 142 'D', 'F', 'G', 'H', 'J', 'K', 'L', 0, 0, 0, 0, 0, 'Y', 'X', 'C', 'V', 143 'B', 'N', 'M', ';', ':', '_', 0, '*', 0, ' ', 0, 0, 0, 0, 0, 0, 144 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 145 0, 0, 0, 0, 0, 0, '>', 0, 0, 0, 0, 0, 0, 0, 0, 0, 146 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 148 }; 149 150 static const char kAltedKeymap[128] = { 151 0, 27, 0, '@', '#', 0, 0, 0, '|', 0, 0, 0, 0, '~', 8, '\t', 152 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '[', ']', 0, 0, 0, 0, 153 0, 0, 0, 0, 0, 0, 0, 0, '{', 0, 0, '}', 0, 0, 0, 0, 154 0, 0, 0, 0, 0, 0, 0, '*', 0, ' ', 0, 0, 0, 0, 0, 0, 155 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 156 0, 0, 0, 0, 0, 0, '\\', 0, 0, 0, 0, 0, 0, 0, 0, 0, 157 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 158 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 159 }; 160 161 #else // default US keymap 162 163 static const char kUnshiftedKeymap[128] = { 164 0, 27, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', 8, '\t', 165 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\n', 0, 'a', 's', 166 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'', '`', 0, '\\', 'z', 'x', 'c', 'v', 167 'b', 'n', 'm', ',', '.', '/', 0, '*', 0, ' ', 0, 0, 0, 0, 0, 0, 168 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 169 '\\', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 171 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 172 }; 173 174 static const char kShiftedKeymap[128] = { 175 0, 27, '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', 8, '\t', 176 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '{', '}', '\n', 0, 'A', 'S', 177 'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', '"', '~', 0, '|', 'Z', 'X', 'C', 'V', 178 'B', 'N', 'M', '<', '>', '?', 0, '*', 0, ' ', 0, 0, 0, 0, 0, 0, 179 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180 '|', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 181 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 182 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 183 }; 184 185 static const char kAltedKeymap[128] = { 186 0, 27, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', 8, '\t', 187 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\n', 0, 'a', 's', 188 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'', '`', 0, '\\', 'z', 'x', 'c', 'v', 189 'b', 'n', 'm', ',', '.', '/', 0, '*', 0, ' ', 0, 0, 0, 0, 0, 0, 190 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191 '\\', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 193 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 194 }; 195 196 #endif 197 #endif // DEBUGGER_KEYMAPS_H 198