- Timestamp:
- 09/20/12 14:13:07 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/KeyboardMap.java
r725 r838 1 1 2 package de.ugoe.cs.tasktree.keyboardmaps; 2 3 … … 16 17 17 18 /** 18 * TODO comment 19 * <p> 20 * Helper class that maps keyboard input based on a key map. 21 * </p> 19 22 * 20 * @version $Revision: $ $Date: 11.07.2012$21 * @author 2012, last modified by $Author: patrick$23 * @version 1.0 24 * @author Patrick Harms 22 25 */ 23 26 public class KeyboardMap { 24 27 25 /** */ 28 /** 29 * <p> 30 * Locale used for the mapping. 31 * </p> 32 */ 26 33 private Locale locale; 27 34 28 /** */ 35 /** 36 * <p> 37 * Name of the mappings-file. 38 * </p> 39 */ 29 40 private String fileName; 30 41 31 /** */ 42 /** 43 * <p> 44 * Map that defines which key strokes define a virtual key. 45 * </p> 46 */ 32 47 private Map<VirtualKey, List<KeyStroke>> keyStrokes = 33 48 new HashMap<VirtualKey, List<KeyStroke>>(); 34 49 35 /** TODO: remove this stuff */36 private List<Object[]> mKeyIds = new ArrayList<Object[]>();37 38 50 /** 39 * TODO: comment 51 * <p> 52 * Creates a new KeyboardMap. 53 * </p> 40 54 * 41 55 * @param locale 56 * Locale that is used for the keyboard map 42 57 */ 43 58 KeyboardMap(Locale locale) { … … 58 73 59 74 /** 60 * TODO: comment 75 * <p> 76 * Returns a character that is generated, given a {@link VirtualKey} is pressed while the 77 * respective modifiers are active. 78 * </p> 61 79 * 62 * @param digit1 63 * @param b 64 * @param c 65 * @param d 66 * @param e 67 * @param f 68 * @return 80 * @param key 81 * key that is pressed 82 * @param numlock 83 * true, if numlock is pressed; false otherwise 84 * @param shift 85 * true, if shift is pressed; false otherwise 86 * @param altgr 87 * true, if altgr is pressed; false otherwise 88 * @param inhibit 89 * true, if inhibit is pressed; false otherwise 90 * @return generated character 69 91 */ 70 92 public char getCharacterFor(VirtualKey key, 71 boolean numlock, 72 boolean shift, 73 boolean altgr, 74 boolean inhibit) 75 throws IllegalArgumentException 93 boolean numlock, 94 boolean shift, 95 boolean altgr, 96 boolean inhibit) 76 97 { 77 98 List<KeyStroke> candidates = keyStrokes.get(key); … … 104 125 105 126 /** 106 * TODO: comment107 127 * 128 * <p> 129 * Initializes the keyboard map. 130 * </p> 131 * 132 * @throws IllegalArgumentException thrown if there is a problem loading the keyboard map 108 133 */ 109 134 void init() throws IllegalArgumentException { … … 115 140 116 141 Console.traceln(Level.FINER, "read " + keyStrokes.size() + " key strokes and " + 117 142 deadKeySequences.size() + " dead key sequences"); 118 143 119 144 VirtualKeySynonyms virtualKeySynonyms = determineVirtualKeySynonyms(keyStrokes); 120 145 processKeyStrokes(keyStrokes, virtualKeySynonyms); 121 processDeadKeySequences(deadKeySequences); 122 123 for (Object[] keyId : mKeyIds) { 124 System.out.println(Integer.toHexString((Integer) keyId[0]) + " " + keyId[1]); 125 } 146 // TODO still required? processDeadKeySequences(deadKeySequences); 126 147 } 127 148 128 149 /** 129 * TODO: comment 150 * <p> 151 * Returns a {@link InputStream} for a given filename. 152 * </p> 130 153 * 131 * @param fileName 132 * @return 154 * @param name 155 * the filename 156 * @return the {@link InputStream} 133 157 */ 134 158 private InputStream getStream(String name) { 135 Console.traceln 136 (Level.FINER, "reading keymap for locale " + locale +" from resource keymaps/" + name);159 Console.traceln(Level.FINER, "reading keymap for locale " + locale + 160 " from resource keymaps/" + name); 137 161 138 162 InputStream stream = … … 147 171 148 172 /** 149 * TODO: comment 173 * <p> 174 * Reads a keyboard map from a input stream. 175 * </p> 150 176 * 151 177 * @param stream 152 * @param virtualKeySynonyms178 * input stream with the keyboard map 153 179 * @param deadKeySequences 180 * the dead key sequences 181 * @param keyStrokes 182 * the keystrokes 183 * @throws IllegalArgumentException 184 * thrown if there is an error reading the keyboard map 154 185 */ 155 private void readStream(InputStream 186 private void readStream(InputStream stream, 156 187 List<String[]> deadKeySequences, 157 List<String[]> keyStrokes) 158 throws IllegalArgumentException 188 List<String[]> keyStrokes) throws IllegalArgumentException 159 189 { 160 190 BufferedReader in = null; … … 164 194 catch (UnsupportedEncodingException e) { 165 195 Console.traceln(Level.WARNING, "no keyboard map available for locale " + locale); 166 throw new IllegalArgumentException 167 ("provided stream can not be read due to invalid encoding",e);196 throw new IllegalArgumentException("provided stream can not be read due to invalid encoding", 197 e); 168 198 } 169 199 … … 185 215 } 186 216 catch (IOException e) { 187 Console.traceln 188 (Level.WARNING,"could not close input stream for reading keyboard map");217 Console.traceln(Level.WARNING, 218 "could not close input stream for reading keyboard map"); 189 219 } 190 220 } … … 192 222 193 223 /** 194 * TODO: comment 224 * <p> 225 * Processes a line of a keyboard map file. 226 * </p> 195 227 * 196 228 * @param line 229 * the line in the keyboard map file 197 230 * @param deadKeySequences 231 * the dead key sequences 232 * @param keyStrokes 233 * the keystrokes 198 234 */ 199 private void processLine(String line, 200 List<String[]> deadKeySequences, 201 List<String[]> keyStrokes) 235 private void processLine(String line, List<String[]> deadKeySequences, List<String[]> keyStrokes) 202 236 { 203 237 String[] values = line.split(" "); … … 251 285 252 286 /** 253 * TODO: comment 287 * <p> 288 * Determines synonyms for virtual keys for the keyboard map. 289 * </p> 254 290 * 255 291 * @param keyStrokes 256 * @return 292 * the keystrokes 293 * @return the synonyms 257 294 */ 258 295 private VirtualKeySynonyms determineVirtualKeySynonyms(List<String[]> keyStrokes) { … … 291 328 292 329 /** 293 * TODO: comment 330 * <p> 331 * Converts a hexadecimal Id that is contained in a string into the integer Id of the key. 332 * </p> 294 333 * 295 * @param string 296 * @return 334 * @param keyIdString 335 * the Id string 336 * @return the Id as integer 297 337 */ 298 338 private int getKeyId(String keyIdString) { … … 305 345 306 346 /** 307 * TODO: comment 347 * <p> 348 * Processes a list of key strokes. 349 * </p> 308 350 * 309 351 * @param keyStrokes 352 * the key strokes 310 353 * @param virtualKeySynonyms 354 * synonyms of the involved virtual keys 311 355 */ 312 356 private void processKeyStrokes(List<String[]> keyStrokes, VirtualKeySynonyms virtualKeySynonyms) … … 320 364 321 365 /** 322 * TODO: comment 366 * <p> 367 * Handles a key stroke. 368 * </p> 323 369 * 324 370 * @param values 371 * contains the name, string Id, and modifiers of the key stroke 372 * @param virtualKeySynonyms 373 * synonyms of the involved virtual keys 325 374 */ 326 375 private void handleKeyStroke(String[] values, VirtualKeySynonyms virtualKeySynonyms) { … … 379 428 380 429 /** 381 * TODO: comment 430 * <p> 431 * Adds a key stroke and all synonyms to the keyboard map. 432 * </p> 382 433 * 383 434 * @param keyStrokeName 435 * name of the key stroke 384 436 * @param keyId 437 * id of the key stroke 385 438 * @param numlock 439 * true, if numlock is pressed; false otherwise 386 440 * @param localstate 441 * true, if localstate is pressed; false otherwise 387 442 * @param shift 443 * true, if shift is pressed; false otherwise 388 444 * @param altgr 445 * true, if altgr is pressed; false otherwise 389 446 * @param addupper 447 * true, if addupper is pressed; false otherwise 390 448 * @param inhibit 449 * true, if inhibit is pressed; false otherwise 450 * @param virtualKeySynonyms 451 * synonyms of the involved virtual keys 391 452 */ 392 private void addAllRepresentedKeyStrokes(String 393 int 394 boolean 395 boolean 396 boolean 397 boolean 398 boolean 399 boolean 453 private void addAllRepresentedKeyStrokes(String keyStrokeName, 454 int keyId, 455 boolean numlock, 456 boolean localstate, 457 boolean shift, 458 boolean altgr, 459 boolean addupper, 460 boolean inhibit, 400 461 VirtualKeySynonyms virtualKeySynonyms) 401 462 { … … 404 465 if (virtualKeys == null) { 405 466 Console.traceln(Level.SEVERE, "no virtual key mapped to key stroke " + keyStrokeName + 406 " of keyboard map for locale " + locale); 407 // throw new IllegalArgumentException("no keyboard map available for locale " + 408 // mLocale); 467 " of keyboard map for locale " + locale); 409 468 return; 410 469 } … … 413 472 if (addupper) { 414 473 char c = determineCharacter(keyStrokeName, true); 415 addKeyStroke 416 (keyStrokeName, virtualKey, numlock, localstate, true, altgr, inhibit,c);474 addKeyStroke(keyStrokeName, virtualKey, numlock, localstate, true, altgr, inhibit, 475 c); 417 476 418 477 c = determineCharacter(keyStrokeName, false); 419 addKeyStroke 420 (keyStrokeName, virtualKey, numlock, localstate, false, altgr, inhibit,c);478 addKeyStroke(keyStrokeName, virtualKey, numlock, localstate, false, altgr, inhibit, 479 c); 421 480 } 422 481 else { 423 482 char c = determineCharacter(keyStrokeName, false); 424 addKeyStroke 425 (keyStrokeName, virtualKey, numlock, localstate, shift, altgr, inhibit,c);483 addKeyStroke(keyStrokeName, virtualKey, numlock, localstate, shift, altgr, inhibit, 484 c); 426 485 } 427 486 } … … 429 488 430 489 /** 431 * TODO: comment 490 * <p> 491 * Adds a key stroke and to the keyboard map. 492 * </p> 432 493 * 433 * @param keyStroke 494 * @param keyStrokeName 495 * name of the key stroke 496 * @param virtualKey 497 * the associated virtual key 498 * @param numlock 499 * true, if numlock is pressed; false otherwise 500 * @param localstate 501 * true, if localstate is pressed; false otherwise 502 * @param shift 503 * true, if shift is pressed; false otherwise 504 * @param altgr 505 * true, if altgr is pressed; false otherwise 506 * @param addupper 507 * true, if addupper is pressed; false otherwise 508 * @param inhibit 509 * true, if inhibit is pressed; false otherwise 510 * @param character 511 * the resulting character 434 512 */ 435 private void addKeyStroke(String 513 private void addKeyStroke(String keyStrokeName, 436 514 VirtualKey virtualKey, 437 boolean 438 boolean 439 boolean 440 boolean 441 boolean 442 char 515 boolean numlock, 516 boolean localstate, 517 boolean shift, 518 boolean altgr, 519 boolean inhibit, 520 char character) 443 521 { 444 KeyStroke keyStroke = new KeyStroke 445 (keyStrokeName, virtualKey, numlock, localstate, shift, altgr, inhibit, character); 522 KeyStroke keyStroke = 523 new KeyStroke(keyStrokeName, virtualKey, numlock, localstate, shift, altgr, inhibit, 524 character); 446 525 447 526 List<KeyStroke> keyStrokeList = keyStrokes.get(keyStroke.getVirtualKey()); … … 456 535 457 536 /** 458 * TODO: comment 459 * 537 * <p> 538 * Adds key strokes independent of numlock. 539 * </p> 460 540 */ 461 541 private void addKeyStrokesIndependentOfNumLock() { … … 492 572 493 573 /** 494 * TODO: comment 495 * 496 * @param deadKeySequences 497 */ 498 private void processDeadKeySequences(List<String[]> deadKeySequences) { 499 // TODO Auto-generated method stub 500 // System.out.println("PATRICK: KeyboardMap.processDeadKeySequences "); 501 } 502 503 /** 504 * TODO: comment 574 * <p> 575 * Determines a {@link VirtualKey} depending on a key stroke name 576 * </p> 505 577 * 506 578 * @param keyStrokeName 507 * @param shift508 * @return 579 * name of the key stroke 580 * @return related virtual key 509 581 */ 510 582 private VirtualKey determineVirtualKey(String keyStrokeName) { … … 1021 1093 else { 1022 1094 Console.traceln(Level.FINEST, "unknown virtual key for key stroke " + keyStrokeName + 1023 1095 " specified through " + "keyboard map for locale " + locale); 1024 1096 1025 1097 return null; … … 1053 1125 1054 1126 /** 1055 * TODO: comment 1056 * 1057 * @param keyStrokeName 1058 * @param shift 1059 * @return 1127 * <p> 1128 * Determines the character that is generated by a key stroke. 1129 * </p> 1130 * 1131 * @param keyStrokeName name of the key stroke 1132 * @param getUpper defines whether the upper case version of the key stroke is returned or not 1133 * @return the character 1060 1134 */ 1061 1135 private char determineCharacter(String keyStrokeName, boolean getUpper) { … … 2042 2116 } 2043 2117 } 2044 2045 /**2046 * this is a former implementation2047 *2048 * @param keyId2049 * @return2050 */2051 /*2052 * private VirtualKey[] mapKeyIdToVirtualKeys(int keyId, String keyStrokeName) {2053 *2054 * Set<String> names = null;2055 *2056 * for (int i = 0; i < mKeyIds.size(); i++) { if (((Integer) mKeyIds.get(i)[0]) == keyId) {2057 * names = (Set<String>) mKeyIds.get(i)[1]; break; } }2058 *2059 * if (names == null) { names = new HashSet<String>(); boolean added = false;2060 *2061 * for (int i = 0; i < mKeyIds.size(); i++) { if (((Integer) mKeyIds.get(i)[0]) > keyId) {2062 * mKeyIds.add(i, new Object[] { keyId, names }); added = true; break; } }2063 *2064 * if (!added) { mKeyIds.add(new Object[] { keyId, names }); } }2065 *2066 * names.add(keyStrokeName);2067 *2068 *2069 * switch(keyId) { case 0x36: case 0x2a: return new VirtualKey[] { VirtualKey.SHIFT }; case2070 * 0xb8: return new VirtualKey[] { VirtualKey.ALT_GRAPH }; case 0x38: return new VirtualKey[] {2071 * VirtualKey.ALT }; case 0x9d: case 0x1d: return new VirtualKey[] { VirtualKey.CONTROL }; case2072 * 0xdd: return new VirtualKey[] { VirtualKey.WINDOWS }; case 0x2: return new VirtualKey[] {2073 * VirtualKey.DIGIT_1 }; case 0x3: return new VirtualKey[] { VirtualKey.DIGIT_2 }; case 0x4:2074 * return new VirtualKey[] { VirtualKey.DIGIT_3 }; case 0x5: return new VirtualKey[] {2075 * VirtualKey.DIGIT_4 }; case 0x6: return new VirtualKey[] { VirtualKey.DIGIT_5 }; case 0x7:2076 * return new VirtualKey[] { VirtualKey.DIGIT_6 }; case 0x8: return new VirtualKey[] {2077 * VirtualKey.DIGIT_7 }; case 0x9: return new VirtualKey[] { VirtualKey.DIGIT_8 }; case 0xa:2078 * return new VirtualKey[] { VirtualKey.DIGIT_9 }; case 0xb: return new VirtualKey[] {2079 * VirtualKey.DIGIT_0 }; case 0xe: return new VirtualKey[] { VirtualKey.BACK_SPACE }; case 0xf:2080 * return new VirtualKey[] { VirtualKey.TAB }; case 0x10: return new VirtualKey[] {2081 * VirtualKey.LETTER_Q }; case 0x11: return new VirtualKey[] { VirtualKey.LETTER_W }; case 0x12:2082 * return new VirtualKey[] { VirtualKey.LETTER_E }; case 0x13: return new VirtualKey[] {2083 * VirtualKey.LETTER_R }; case 0x14: return new VirtualKey[] { VirtualKey.LETTER_T }; case 0x15:2084 * return new VirtualKey[] { VirtualKey.LETTER_Y }; case 0x16: return new VirtualKey[] {2085 * VirtualKey.LETTER_U }; case 0x17: return new VirtualKey[] { VirtualKey.LETTER_I }; case 0x18:2086 * return new VirtualKey[] { VirtualKey.LETTER_O }; case 0x19: return new VirtualKey[] {2087 * VirtualKey.LETTER_P }; case 0x1e: return new VirtualKey[] { VirtualKey.LETTER_A }; case 0x1f:2088 * return new VirtualKey[] { VirtualKey.LETTER_S }; case 0x20: return new VirtualKey[] {2089 * VirtualKey.LETTER_D }; case 0x21: return new VirtualKey[] { VirtualKey.LETTER_F }; case 0x22:2090 * return new VirtualKey[] { VirtualKey.LETTER_G }; case 0x23: return new VirtualKey[] {2091 * VirtualKey.LETTER_H }; case 0x24: return new VirtualKey[] { VirtualKey.LETTER_J }; case 0x25:2092 * return new VirtualKey[] { VirtualKey.LETTER_K }; case 0x26: return new VirtualKey[] {2093 * VirtualKey.LETTER_L }; case 0x1c: return new VirtualKey[] { VirtualKey.ENTER }; case 0x2c:2094 * return new VirtualKey[] { VirtualKey.LETTER_Z }; case 0x2d: return new VirtualKey[] {2095 * VirtualKey.LETTER_X }; case 0x2e: return new VirtualKey[] { VirtualKey.LETTER_C }; case 0x2f:2096 * return new VirtualKey[] { VirtualKey.LETTER_V }; case 0x30: return new VirtualKey[] {2097 * VirtualKey.LETTER_B }; case 0x31: return new VirtualKey[] { VirtualKey.LETTER_N }; case 0x32:2098 * return new VirtualKey[] { VirtualKey.LETTER_M }; case 0x39: return new VirtualKey[] {2099 * VirtualKey.SPACE }; case 0x56: return new VirtualKey[] { VirtualKey.LESS }; case 0x1: return2100 * new VirtualKey[] { VirtualKey.ESCAPE }; case 0x3b: return new VirtualKey[] { VirtualKey.F1 };2101 * case 0x3c: return new VirtualKey[] { VirtualKey.F2 }; case 0x3d: return new VirtualKey[] {2102 * VirtualKey.F3 }; case 0x3e: return new VirtualKey[] { VirtualKey.F4 }; case 0x3f: return new2103 * VirtualKey[] { VirtualKey.F5 }; case 0x40: return new VirtualKey[] { VirtualKey.F6 }; case2104 * 0x41: return new VirtualKey[] { VirtualKey.F7 }; case 0x42: return new VirtualKey[] {2105 * VirtualKey.F8 }; case 0x43: return new VirtualKey[] { VirtualKey.F9 }; case 0x44: return new2106 * VirtualKey[] { VirtualKey.F10 }; case 0x57: return new VirtualKey[] { VirtualKey.F11 }; case2107 * 0x58: return new VirtualKey[] { VirtualKey.F12 }; case 0xb7: return new VirtualKey[] {2108 * VirtualKey.PRINTSCREEN }; case 0x46: return new VirtualKey[] { VirtualKey.SCROLL_LOCK }; case2109 * 0xd2: return new VirtualKey[] { VirtualKey.INSERT }; case 0xd3: return new VirtualKey[] {2110 * VirtualKey.DELETE }; case 0xc7: return new VirtualKey[] { VirtualKey.HOME }; case 0xcf:2111 * return new VirtualKey[] { VirtualKey.END }; case 0xc9: return new VirtualKey[] {2112 * VirtualKey.PAGE_UP }; case 0xd1: return new VirtualKey[] { VirtualKey.PAGE_DOWN }; case 0xcb:2113 * return new VirtualKey[] { VirtualKey.LEFT }; case 0xc8: return new VirtualKey[] {2114 * VirtualKey.UP }; case 0xd0: return new VirtualKey[] { VirtualKey.DOWN }; case 0xcd: return2115 * new VirtualKey[] { VirtualKey.RIGHT }; case 0x45: return new VirtualKey[] {2116 * VirtualKey.NUM_LOCK }; case 0xb5: return new VirtualKey[] { VirtualKey.DIVIDE }; case 0x37:2117 * return new VirtualKey[] { VirtualKey.MULTIPLY }; case 0x4a: return new VirtualKey[] {2118 * VirtualKey.SUBTRACT }; case 0x4e: return new VirtualKey[] { VirtualKey.ADD }; case 0x9c:2119 * return new VirtualKey[] { VirtualKey.ENTER }; case 0x53: return new VirtualKey[] {2120 * VirtualKey.DECIMAL, VirtualKey.DELETE }; case 0x52: return new VirtualKey[] {2121 * VirtualKey.NUMPAD_0, VirtualKey.INSERT }; case 0x4f: return new VirtualKey[] {2122 * VirtualKey.NUMPAD_1, VirtualKey.END }; case 0x50: return new VirtualKey[] {2123 * VirtualKey.NUMPAD_2, VirtualKey.KP_DOWN }; case 0x51: return new VirtualKey[] {2124 * VirtualKey.NUMPAD_3, VirtualKey.PAGE_UP }; case 0x4b: return new VirtualKey[] {2125 * VirtualKey.NUMPAD_4, VirtualKey.KP_LEFT }; case 0x4c: return new VirtualKey[] {2126 * VirtualKey.NUMPAD_5, VirtualKey.BEGIN }; case 0x4d: return new VirtualKey[] {2127 * VirtualKey.NUMPAD_6, VirtualKey.KP_RIGHT }; case 0x47: return new VirtualKey[] {2128 * VirtualKey.NUMPAD_7, VirtualKey.HOME }; case 0x48: return new VirtualKey[] {2129 * VirtualKey.NUMPAD_8, VirtualKey.KP_UP }; case 0x49: return new VirtualKey[] {2130 * VirtualKey.NUMPAD_9, VirtualKey.PAGE_DOWN }; case 0x0: return new VirtualKey[] {2131 * VirtualKey.CAPS_LOCK }; case 0xc: return new VirtualKey[] { VirtualKey.MINUS,2132 * VirtualKey.UNDERSCORE }; case 0xd: return new VirtualKey[] { VirtualKey.EQUALS,2133 * VirtualKey.PLUS }; case 0x1a: return new VirtualKey[] { VirtualKey.OPEN_BRACKET,2134 * VirtualKey.BRACELEFT }; case 0x1b: return new VirtualKey[] { VirtualKey.CLOSE_BRACKET,2135 * VirtualKey.BRACERIGHT }; case 0x27: return new VirtualKey[] { VirtualKey.SEMICOLON,2136 * VirtualKey.COLON }; /* case 0x28: return new VirtualKey[] { VirtualKey.APOSTROPHE,2137 * VirtualKey.QUOTEDBL }; case 0x29: return new VirtualKey[] { VirtualKey.DEAD_GRAVE,2138 * VirtualKey.DEAD_TILDE }; case 0x2b: return new VirtualKey[] { VirtualKey.BACK_SLASH,2139 * VirtualKey.BAR }; case 0x33: return new VirtualKey[] { VirtualKey.COMMA, VirtualKey.LESS };2140 * case 0x34: return new VirtualKey[] { VirtualKey.PERIOD, VirtualKey.GREATER }; case 0x35:2141 * return new VirtualKey[] { VirtualKey.SLASH, VirtualKey.QUESTIONMARK }; case 0x73: return new2142 * VirtualKey[] { VirtualKey.BACK_SLASH, VirtualKey.DEGREE, VirtualKey.QUESTIONMARK,2143 * VirtualKey.UNDERSCORE }; case 0x7d: return new VirtualKey[] { VirtualKey.BAR }; case 0x79:2144 * return new VirtualKey[] { VirtualKey.HENKAN_MODE }; case 0x70: return new VirtualKey[] {2145 * VirtualKey.KATAKANA }; case 0x7b: return new VirtualKey[] { VirtualKey.MUHENKAN }; case 0x3a:2146 * return new VirtualKey[] { VirtualKey.EISU_TOGGLE, VirtualKey.CAPS_LOCK }; case 0xdc: return2147 * new VirtualKey[] { VirtualKey.F13 }; case 0xf2: return new VirtualKey[] { VirtualKey.HANGUL2148 * }; case 0xf1: return new VirtualKey[] { VirtualKey.HANGUL_HANJA }; case 0x54: return new2149 * VirtualKey[] { VirtualKey.EXECUTE }; default: LOG.severe("unknown key id 0x" +2150 * Integer.toHexString(keyId) + " specified for key stroke " + keyStrokeName +2151 * " through keyboard map for locale " + mLocale); throw new2152 * IllegalArgumentException("no keyboard map available for locale " + mLocale); } }2153 */2154 2155 2118 }
Note: See TracChangeset
for help on using the changeset viewer.