1 | /* Virtual key codes. */ |
2 | |
3 | public static final int VK_ENTER = '\n'; |
4 | public static final int VK_BACK_SPACE = '\b'; |
5 | public static final int VK_TAB = '\t'; |
6 | public static final int VK_CANCEL = 0x03; |
7 | public static final int VK_CLEAR = 0x0C; |
8 | public static final int VK_SHIFT = 0x10; |
9 | public static final int VK_CONTROL = 0x11; |
10 | public static final int VK_ALT = 0x12; |
11 | public static final int VK_PAUSE = 0x13; |
12 | public static final int VK_CAPS_LOCK = 0x14; |
13 | public static final int VK_ESCAPE = 0x1B; |
14 | public static final int VK_SPACE = 0x20; |
15 | public static final int VK_PAGE_UP = 0x21; |
16 | public static final int VK_PAGE_DOWN = 0x22; |
17 | public static final int VK_END = 0x23; |
18 | public static final int VK_HOME = 0x24; |
19 | |
20 | /** |
21 | * Constant for the non-numpad <b>left</b> arrow key. |
22 | * @see #VK_KP_LEFT |
23 | */ |
24 | public static final int VK_LEFT = 0x25; |
25 | |
26 | /** |
27 | * Constant for the non-numpad <b>up</b> arrow key. |
28 | * @see #VK_KP_UP |
29 | */ |
30 | public static final int VK_UP = 0x26; |
31 | |
32 | /** |
33 | * Constant for the non-numpad <b>right</b> arrow key. |
34 | * @see #VK_KP_RIGHT |
35 | */ |
36 | public static final int VK_RIGHT = 0x27; |
37 | |
38 | /** |
39 | * Constant for the non-numpad <b>down</b> arrow key. |
40 | * @see #VK_KP_DOWN |
41 | */ |
42 | public static final int VK_DOWN = 0x28; |
43 | |
44 | /** |
45 | * Constant for the comma key, "," |
46 | */ |
47 | public static final int VK_COMMA = 0x2C; |
48 | |
49 | /** |
50 | * Constant for the minus key, "-" |
51 | * @since 1.2 |
52 | */ |
53 | public static final int VK_MINUS = 0x2D; |
54 | |
55 | /** |
56 | * Constant for the period key, "." |
57 | */ |
58 | public static final int VK_PERIOD = 0x2E; |
59 | |
60 | /** |
61 | * Constant for the forward slash key, "/" |
62 | */ |
63 | public static final int VK_SLASH = 0x2F; |
64 | |
65 | /** VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */ |
66 | public static final int VK_0 = 0x30; |
67 | public static final int VK_1 = 0x31; |
68 | public static final int VK_2 = 0x32; |
69 | public static final int VK_3 = 0x33; |
70 | public static final int VK_4 = 0x34; |
71 | public static final int VK_5 = 0x35; |
72 | public static final int VK_6 = 0x36; |
73 | public static final int VK_7 = 0x37; |
74 | public static final int VK_8 = 0x38; |
75 | public static final int VK_9 = 0x39; |
76 | |
77 | /** |
78 | * Constant for the semicolon key, ";" |
79 | */ |
80 | public static final int VK_SEMICOLON = 0x3B; |
81 | |
82 | /** |
83 | * Constant for the equals key, "=" |
84 | */ |
85 | public static final int VK_EQUALS = 0x3D; |
86 | |
87 | /** VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */ |
88 | public static final int VK_A = 0x41; |
89 | public static final int VK_B = 0x42; |
90 | public static final int VK_C = 0x43; |
91 | public static final int VK_D = 0x44; |
92 | public static final int VK_E = 0x45; |
93 | public static final int VK_F = 0x46; |
94 | public static final int VK_G = 0x47; |
95 | public static final int VK_H = 0x48; |
96 | public static final int VK_I = 0x49; |
97 | public static final int VK_J = 0x4A; |
98 | public static final int VK_K = 0x4B; |
99 | public static final int VK_L = 0x4C; |
100 | public static final int VK_M = 0x4D; |
101 | public static final int VK_N = 0x4E; |
102 | public static final int VK_O = 0x4F; |
103 | public static final int VK_P = 0x50; |
104 | public static final int VK_Q = 0x51; |
105 | public static final int VK_R = 0x52; |
106 | public static final int VK_S = 0x53; |
107 | public static final int VK_T = 0x54; |
108 | public static final int VK_U = 0x55; |
109 | public static final int VK_V = 0x56; |
110 | public static final int VK_W = 0x57; |
111 | public static final int VK_X = 0x58; |
112 | public static final int VK_Y = 0x59; |
113 | public static final int VK_Z = 0x5A; |
114 | |
115 | /** |
116 | * Constant for the open bracket key, "[" |
117 | */ |
118 | public static final int VK_OPEN_BRACKET = 0x5B; |
119 | |
120 | /** |
121 | * Constant for the back slash key, "\" |
122 | */ |
123 | public static final int VK_BACK_SLASH = 0x5C; |
124 | |
125 | /** |
126 | * Constant for the close bracket key, "]" |
127 | */ |
128 | public static final int VK_CLOSE_BRACKET = 0x5D; |
129 | |
130 | public static final int VK_NUMPAD0 = 0x60; |
131 | public static final int VK_NUMPAD1 = 0x61; |
132 | public static final int VK_NUMPAD2 = 0x62; |
133 | public static final int VK_NUMPAD3 = 0x63; |
134 | public static final int VK_NUMPAD4 = 0x64; |
135 | public static final int VK_NUMPAD5 = 0x65; |
136 | public static final int VK_NUMPAD6 = 0x66; |
137 | public static final int VK_NUMPAD7 = 0x67; |
138 | public static final int VK_NUMPAD8 = 0x68; |
139 | public static final int VK_NUMPAD9 = 0x69; |
140 | public static final int VK_MULTIPLY = 0x6A; |
141 | public static final int VK_ADD = 0x6B; |
142 | |
143 | /** |
144 | * This constant is obsolete, and is included only for backwards |
145 | * compatibility. |
146 | * @see #VK_SEPARATOR |
147 | */ |
148 | public static final int VK_SEPARATER = 0x6C; |
149 | |
150 | /** |
151 | * Constant for the Numpad Separator key. |
152 | * @since 1.4 |
153 | */ |
154 | public static final int VK_SEPARATOR = VK_SEPARATER; |
155 | |
156 | public static final int VK_SUBTRACT = 0x6D; |
157 | public static final int VK_DECIMAL = 0x6E; |
158 | public static final int VK_DIVIDE = 0x6F; |
159 | public static final int VK_DELETE = 0x7F; /* ASCII DEL */ |
160 | public static final int VK_NUM_LOCK = 0x90; |
161 | public static final int VK_SCROLL_LOCK = 0x91; |
162 | |
163 | /** Constant for the F1 function key. */ |
164 | public static final int VK_F1 = 0x70; |
165 | |
166 | /** Constant for the F2 function key. */ |
167 | public static final int VK_F2 = 0x71; |
168 | |
169 | /** Constant for the F3 function key. */ |
170 | public static final int VK_F3 = 0x72; |
171 | |
172 | /** Constant for the F4 function key. */ |
173 | public static final int VK_F4 = 0x73; |
174 | |
175 | /** Constant for the F5 function key. */ |
176 | public static final int VK_F5 = 0x74; |
177 | |
178 | /** Constant for the F6 function key. */ |
179 | public static final int VK_F6 = 0x75; |
180 | |
181 | /** Constant for the F7 function key. */ |
182 | public static final int VK_F7 = 0x76; |
183 | |
184 | /** Constant for the F8 function key. */ |
185 | public static final int VK_F8 = 0x77; |
186 | |
187 | /** Constant for the F9 function key. */ |
188 | public static final int VK_F9 = 0x78; |
189 | |
190 | /** Constant for the F10 function key. */ |
191 | public static final int VK_F10 = 0x79; |
192 | |
193 | /** Constant for the F11 function key. */ |
194 | public static final int VK_F11 = 0x7A; |
195 | |
196 | /** Constant for the F12 function key. */ |
197 | public static final int VK_F12 = 0x7B; |
198 | |
199 | /** |
200 | * Constant for the F13 function key. |
201 | * @since 1.2 |
202 | */ |
203 | /* F13 - F24 are used on IBM 3270 keyboard; use random range for constants. */ |
204 | public static final int VK_F13 = 0xF000; |
205 | |
206 | /** |
207 | * Constant for the F14 function key. |
208 | * @since 1.2 |
209 | */ |
210 | public static final int VK_F14 = 0xF001; |
211 | |
212 | /** |
213 | * Constant for the F15 function key. |
214 | * @since 1.2 |
215 | */ |
216 | public static final int VK_F15 = 0xF002; |
217 | |
218 | /** |
219 | * Constant for the F16 function key. |
220 | * @since 1.2 |
221 | */ |
222 | public static final int VK_F16 = 0xF003; |
223 | |
224 | /** |
225 | * Constant for the F17 function key. |
226 | * @since 1.2 |
227 | */ |
228 | public static final int VK_F17 = 0xF004; |
229 | |
230 | /** |
231 | * Constant for the F18 function key. |
232 | * @since 1.2 |
233 | */ |
234 | public static final int VK_F18 = 0xF005; |
235 | |
236 | /** |
237 | * Constant for the F19 function key. |
238 | * @since 1.2 |
239 | */ |
240 | public static final int VK_F19 = 0xF006; |
241 | |
242 | /** |
243 | * Constant for the F20 function key. |
244 | * @since 1.2 |
245 | */ |
246 | public static final int VK_F20 = 0xF007; |
247 | |
248 | /** |
249 | * Constant for the F21 function key. |
250 | * @since 1.2 |
251 | */ |
252 | public static final int VK_F21 = 0xF008; |
253 | |
254 | /** |
255 | * Constant for the F22 function key. |
256 | * @since 1.2 |
257 | */ |
258 | public static final int VK_F22 = 0xF009; |
259 | |
260 | /** |
261 | * Constant for the F23 function key. |
262 | * @since 1.2 |
263 | */ |
264 | public static final int VK_F23 = 0xF00A; |
265 | |
266 | /** |
267 | * Constant for the F24 function key. |
268 | * @since 1.2 |
269 | */ |
270 | public static final int VK_F24 = 0xF00B; |
271 | |
272 | public static final int VK_PRINTSCREEN = 0x9A; |
273 | public static final int VK_INSERT = 0x9B; |
274 | public static final int VK_HELP = 0x9C; |
275 | public static final int VK_META = 0x9D; |
276 | |
277 | public static final int VK_BACK_QUOTE = 0xC0; |
278 | public static final int VK_QUOTE = 0xDE; |
279 | |
280 | /** |
281 | * Constant for the numeric keypad <b>up</b> arrow key. |
282 | * @see #VK_UP |
283 | * @since 1.2 |
284 | */ |
285 | public static final int VK_KP_UP = 0xE0; |
286 | |
287 | /** |
288 | * Constant for the numeric keypad <b>down</b> arrow key. |
289 | * @see #VK_DOWN |
290 | * @since 1.2 |
291 | */ |
292 | public static final int VK_KP_DOWN = 0xE1; |
293 | |
294 | /** |
295 | * Constant for the numeric keypad <b>left</b> arrow key. |
296 | * @see #VK_LEFT |
297 | * @since 1.2 |
298 | */ |
299 | public static final int VK_KP_LEFT = 0xE2; |
300 | |
301 | /** |
302 | * Constant for the numeric keypad <b>right</b> arrow key. |
303 | * @see #VK_RIGHT |
304 | * @since 1.2 |
305 | */ |
306 | public static final int VK_KP_RIGHT = 0xE3; |
307 | |
308 | /* For European keyboards */ |
309 | /** @since 1.2 */ |
310 | public static final int VK_DEAD_GRAVE = 0x80; |
311 | /** @since 1.2 */ |
312 | public static final int VK_DEAD_ACUTE = 0x81; |
313 | /** @since 1.2 */ |
314 | public static final int VK_DEAD_CIRCUMFLEX = 0x82; |
315 | /** @since 1.2 */ |
316 | public static final int VK_DEAD_TILDE = 0x83; |
317 | /** @since 1.2 */ |
318 | public static final int VK_DEAD_MACRON = 0x84; |
319 | /** @since 1.2 */ |
320 | public static final int VK_DEAD_BREVE = 0x85; |
321 | /** @since 1.2 */ |
322 | public static final int VK_DEAD_ABOVEDOT = 0x86; |
323 | /** @since 1.2 */ |
324 | public static final int VK_DEAD_DIAERESIS = 0x87; |
325 | /** @since 1.2 */ |
326 | public static final int VK_DEAD_ABOVERING = 0x88; |
327 | /** @since 1.2 */ |
328 | public static final int VK_DEAD_DOUBLEACUTE = 0x89; |
329 | /** @since 1.2 */ |
330 | public static final int VK_DEAD_CARON = 0x8a; |
331 | /** @since 1.2 */ |
332 | public static final int VK_DEAD_CEDILLA = 0x8b; |
333 | /** @since 1.2 */ |
334 | public static final int VK_DEAD_OGONEK = 0x8c; |
335 | /** @since 1.2 */ |
336 | public static final int VK_DEAD_IOTA = 0x8d; |
337 | /** @since 1.2 */ |
338 | public static final int VK_DEAD_VOICED_SOUND = 0x8e; |
339 | /** @since 1.2 */ |
340 | public static final int VK_DEAD_SEMIVOICED_SOUND = 0x8f; |
341 | |
342 | /** @since 1.2 */ |
343 | public static final int VK_AMPERSAND = 0x96; |
344 | /** @since 1.2 */ |
345 | public static final int VK_ASTERISK = 0x97; |
346 | /** @since 1.2 */ |
347 | public static final int VK_QUOTEDBL = 0x98; |
348 | /** @since 1.2 */ |
349 | public static final int VK_LESS = 0x99; |
350 | |
351 | /** @since 1.2 */ |
352 | public static final int VK_GREATER = 0xa0; |
353 | /** @since 1.2 */ |
354 | public static final int VK_BRACELEFT = 0xa1; |
355 | /** @since 1.2 */ |
356 | public static final int VK_BRACERIGHT = 0xa2; |
357 | |
358 | /** |
359 | * Constant for the "@" key. |
360 | * @since 1.2 |
361 | */ |
362 | public static final int VK_AT = 0x0200; |
363 | |
364 | /** |
365 | * Constant for the ":" key. |
366 | * @since 1.2 |
367 | */ |
368 | public static final int VK_COLON = 0x0201; |
369 | |
370 | /** |
371 | * Constant for the "^" key. |
372 | * @since 1.2 |
373 | */ |
374 | public static final int VK_CIRCUMFLEX = 0x0202; |
375 | |
376 | /** |
377 | * Constant for the "$" key. |
378 | * @since 1.2 |
379 | */ |
380 | public static final int VK_DOLLAR = 0x0203; |
381 | |
382 | /** |
383 | * Constant for the Euro currency sign key. |
384 | * @since 1.2 |
385 | */ |
386 | public static final int VK_EURO_SIGN = 0x0204; |
387 | |
388 | /** |
389 | * Constant for the "!" key. |
390 | * @since 1.2 |
391 | */ |
392 | public static final int VK_EXCLAMATION_MARK = 0x0205; |
393 | |
394 | /** |
395 | * Constant for the inverted exclamation mark key. |
396 | * @since 1.2 |
397 | */ |
398 | public static final int VK_INVERTED_EXCLAMATION_MARK = 0x0206; |
399 | |
400 | /** |
401 | * Constant for the "(" key. |
402 | * @since 1.2 |
403 | */ |
404 | public static final int VK_LEFT_PARENTHESIS = 0x0207; |
405 | |
406 | /** |
407 | * Constant for the "#" key. |
408 | * @since 1.2 |
409 | */ |
410 | public static final int VK_NUMBER_SIGN = 0x0208; |
411 | |
412 | /** |
413 | * Constant for the "+" key. |
414 | * @since 1.2 |
415 | */ |
416 | public static final int VK_PLUS = 0x0209; |
417 | |
418 | /** |
419 | * Constant for the ")" key. |
420 | * @since 1.2 |
421 | */ |
422 | public static final int VK_RIGHT_PARENTHESIS = 0x020A; |
423 | |
424 | /** |
425 | * Constant for the "_" key. |
426 | * @since 1.2 |
427 | */ |
428 | public static final int VK_UNDERSCORE = 0x020B; |
429 | |
430 | /** |
431 | * Constant for the Microsoft Windows "Windows" key. |
432 | * It is used for both the left and right version of the key. |
433 | * @see #getKeyLocation() |
434 | * @since 1.5 |
435 | */ |
436 | public static final int VK_WINDOWS = 0x020C; |
437 | |
438 | /** |
439 | * Constant for the Microsoft Windows Context Menu key. |
440 | * @since 1.5 |
441 | */ |
442 | public static final int VK_CONTEXT_MENU = 0x020D; |
443 | |
444 | /* for input method support on Asian Keyboards */ |
445 | |
446 | /* not clear what this means - listed in Microsoft Windows API */ |
447 | public static final int VK_FINAL = 0x0018; |
448 | |
449 | /** Constant for the Convert function key. */ |
450 | /* Japanese PC 106 keyboard, Japanese Solaris keyboard: henkan */ |
451 | public static final int VK_CONVERT = 0x001C; |
452 | |
453 | /** Constant for the Don't Convert function key. */ |
454 | /* Japanese PC 106 keyboard: muhenkan */ |
455 | public static final int VK_NONCONVERT = 0x001D; |
456 | |
457 | /** Constant for the Accept or Commit function key. */ |
458 | /* Japanese Solaris keyboard: kakutei */ |
459 | public static final int VK_ACCEPT = 0x001E; |
460 | |
461 | /* not clear what this means - listed in Microsoft Windows API */ |
462 | public static final int VK_MODECHANGE = 0x001F; |
463 | |
464 | /* replaced by VK_KANA_LOCK for Microsoft Windows and Solaris; |
465 | might still be used on other platforms */ |
466 | public static final int VK_KANA = 0x0015; |
467 | |
468 | /* replaced by VK_INPUT_METHOD_ON_OFF for Microsoft Windows and Solaris; |
469 | might still be used for other platforms */ |
470 | public static final int VK_KANJI = 0x0019; |
471 | |
472 | /** |
473 | * Constant for the Alphanumeric function key. |
474 | * @since 1.2 |
475 | */ |
476 | /* Japanese PC 106 keyboard: eisuu */ |
477 | public static final int VK_ALPHANUMERIC = 0x00F0; |
478 | |
479 | /** |
480 | * Constant for the Katakana function key. |
481 | * @since 1.2 |
482 | */ |
483 | /* Japanese PC 106 keyboard: katakana */ |
484 | public static final int VK_KATAKANA = 0x00F1; |
485 | |
486 | /** |
487 | * Constant for the Hiragana function key. |
488 | * @since 1.2 |
489 | */ |
490 | /* Japanese PC 106 keyboard: hiragana */ |
491 | public static final int VK_HIRAGANA = 0x00F2; |
492 | |
493 | /** |
494 | * Constant for the Full-Width Characters function key. |
495 | * @since 1.2 |
496 | */ |
497 | /* Japanese PC 106 keyboard: zenkaku */ |
498 | public static final int VK_FULL_WIDTH = 0x00F3; |
499 | |
500 | /** |
501 | * Constant for the Half-Width Characters function key. |
502 | * @since 1.2 |
503 | */ |
504 | /* Japanese PC 106 keyboard: hankaku */ |
505 | public static final int VK_HALF_WIDTH = 0x00F4; |
506 | |
507 | /** |
508 | * Constant for the Roman Characters function key. |
509 | * @since 1.2 |
510 | */ |
511 | /* Japanese PC 106 keyboard: roumaji */ |
512 | public static final int VK_ROMAN_CHARACTERS = 0x00F5; |
513 | |
514 | /** |
515 | * Constant for the All Candidates function key. |
516 | * @since 1.2 |
517 | */ |
518 | /* Japanese PC 106 keyboard - VK_CONVERT + ALT: zenkouho */ |
519 | public static final int VK_ALL_CANDIDATES = 0x0100; |
520 | |
521 | /** |
522 | * Constant for the Previous Candidate function key. |
523 | * @since 1.2 |
524 | */ |
525 | /* Japanese PC 106 keyboard - VK_CONVERT + SHIFT: maekouho */ |
526 | public static final int VK_PREVIOUS_CANDIDATE = 0x0101; |
527 | |
528 | /** |
529 | * Constant for the Code Input function key. |
530 | * @since 1.2 |
531 | */ |
532 | /* Japanese PC 106 keyboard - VK_ALPHANUMERIC + ALT: kanji bangou */ |
533 | public static final int VK_CODE_INPUT = 0x0102; |
534 | |
535 | /** |
536 | * Constant for the Japanese-Katakana function key. |
537 | * This key switches to a Japanese input method and selects its Katakana input mode. |
538 | * @since 1.2 |
539 | */ |
540 | /* Japanese Macintosh keyboard - VK_JAPANESE_HIRAGANA + SHIFT */ |
541 | public static final int VK_JAPANESE_KATAKANA = 0x0103; |
542 | |
543 | /** |
544 | * Constant for the Japanese-Hiragana function key. |
545 | * This key switches to a Japanese input method and selects its Hiragana input mode. |
546 | * @since 1.2 |
547 | */ |
548 | /* Japanese Macintosh keyboard */ |
549 | public static final int VK_JAPANESE_HIRAGANA = 0x0104; |
550 | |
551 | /** |
552 | * Constant for the Japanese-Roman function key. |
553 | * This key switches to a Japanese input method and selects its Roman-Direct input mode. |
554 | * @since 1.2 |
555 | */ |
556 | /* Japanese Macintosh keyboard */ |
557 | public static final int VK_JAPANESE_ROMAN = 0x0105; |
558 | |
559 | /** |
560 | * Constant for the locking Kana function key. |
561 | * This key locks the keyboard into a Kana layout. |
562 | * @since 1.3 |
563 | */ |
564 | /* Japanese PC 106 keyboard with special Windows driver - eisuu + Control; Japanese Solaris keyboard: kana */ |
565 | public static final int VK_KANA_LOCK = 0x0106; |
566 | |
567 | /** |
568 | * Constant for the input method on/off key. |
569 | * @since 1.3 |
570 | */ |
571 | /* Japanese PC 106 keyboard: kanji. Japanese Solaris keyboard: nihongo */ |
572 | public static final int VK_INPUT_METHOD_ON_OFF = 0x0107; |
573 | |
574 | /* for Sun keyboards */ |
575 | /** @since 1.2 */ |
576 | public static final int VK_CUT = 0xFFD1; |
577 | /** @since 1.2 */ |
578 | public static final int VK_COPY = 0xFFCD; |
579 | /** @since 1.2 */ |
580 | public static final int VK_PASTE = 0xFFCF; |
581 | /** @since 1.2 */ |
582 | public static final int VK_UNDO = 0xFFCB; |
583 | /** @since 1.2 */ |
584 | public static final int VK_AGAIN = 0xFFC9; |
585 | /** @since 1.2 */ |
586 | public static final int VK_FIND = 0xFFD0; |
587 | /** @since 1.2 */ |
588 | public static final int VK_PROPS = 0xFFCA; |
589 | /** @since 1.2 */ |
590 | public static final int VK_STOP = 0xFFC8; |
591 | |
592 | /** |
593 | * Constant for the Compose function key. |
594 | * @since 1.2 |
595 | */ |
596 | public static final int VK_COMPOSE = 0xFF20; |
597 | |
598 | /** |
599 | * Constant for the AltGraph function key. |
600 | * @since 1.2 |
601 | */ |
602 | public static final int VK_ALT_GRAPH = 0xFF7E; |
603 | |
604 | /** |
605 | * Constant for the Begin key. |
606 | * @since 1.5 |
607 | */ |
608 | public static final int VK_BEGIN = 0xFF58; |
609 | |
610 | /** |
611 | * This value is used to indicate that the keyCode is unknown. |
612 | * KEY_TYPED events do not have a keyCode value; this value |
613 | * is used instead. |
614 | */ |
615 | public static final int VK_UNDEFINED = 0x0; |
616 | |
617 | /** |
618 | * KEY_PRESSED and KEY_RELEASED events which do not map to a |
619 | * valid Unicode character use this for the keyChar value. |
620 | */ |
621 | public static final char CHAR_UNDEFINED = 0xFFFF; |
622 | |
623 | /** |
624 | * A constant indicating that the keyLocation is indeterminate |
625 | * or not relevant. |
626 | * <code>KEY_TYPED</code> events do not have a keyLocation; this value |
627 | * is used instead. |
628 | * @since 1.4 |
629 | */ |
630 | public static final int KEY_LOCATION_UNKNOWN = 0; |
631 | |
632 | /** |
633 | * A constant indicating that the key pressed or released |
634 | * is not distinguished as the left or right version of a key, |
635 | * and did not originate on the numeric keypad (or did not |
636 | * originate with a virtual key corresponding to the numeric |
637 | * keypad). |
638 | * @since 1.4 |
639 | */ |
640 | public static final int KEY_LOCATION_STANDARD = 1; |
641 | |
642 | /** |
643 | * A constant indicating that the key pressed or released is in |
644 | * the left key location (there is more than one possible location |
645 | * for this key). Example: the left shift key. |
646 | * @since 1.4 |
647 | */ |
648 | public static final int KEY_LOCATION_LEFT = 2; |
649 | |
650 | /** |
651 | * A constant indicating that the key pressed or released is in |
652 | * the right key location (there is more than one possible location |
653 | * for this key). Example: the right shift key. |
654 | * @since 1.4 |
655 | */ |
656 | public static final int KEY_LOCATION_RIGHT = 3; |
657 | |
658 | /** |
659 | * A constant indicating that the key event originated on the |
660 | * numeric keypad or with a virtual key corresponding to the |
661 | * numeric keypad. |
662 | * @since 1.4 |
663 | */ |
664 | public static final int KEY_LOCATION_NUMPAD = 4; |
from KeyEvent.java (Java SDK)
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
ID | Author/Program | Comment | Date |
---|---|---|---|
288 | #1000604 (pitcher) | 2015-08-18 00:54:25 | |
243 | #1000610 (pitcher) | Edit suggestion: !636 !629 main { static Object androidContext; static String programID; public static void main(String[] args) throws Exception { /* Virtual key codes. */ public static final int VK_ENTER = '\n'; public static final int VK_BACK_SPACE = '\b'; public static final int VK_TAB = '\t'; public static final int VK_CANCEL = 0x03; public static final int VK_CLEAR = 0x0C; public static final int VK_SHIFT = 0x10; public static final int VK_CONTROL = 0x11; public static final int VK_ALT = 0x12; public static final int VK_PAUSE = 0x13; public static final int VK_CAPS_LOCK = 0x14; public static final int VK_ESCAPE = 0x1B; public static final int VK_SPACE = 0x20; public static final int VK_PAGE_UP = 0x21; public static final int VK_PAGE_DOWN = 0x22; public static final int VK_END = 0x23; public static final int VK_HOME = 0x24; /** * Constant for the non-numpad <b>left</b> arrow key. * @see #VK_KP_LEFT */ public static final int VK_LEFT = 0x25; /** * Constant for the non-numpad <b>up</b> arrow key. * @see #VK_KP_UP */ public static final int VK_UP = 0x26; /** * Constant for the non-numpad <b>right</b> arrow key. * @see #VK_KP_RIGHT */ public static final int VK_RIGHT = 0x27; /** * Constant for the non-numpad <b>down</b> arrow key. * @see #VK_KP_DOWN */ public static final int VK_DOWN = 0x28; /** * Constant for the comma key, "," */ public static final int VK_COMMA = 0x2C; /** * Constant for the minus key, "-" * @since 1.2 */ public static final int VK_MINUS = 0x2D; /** * Constant for the period key, "." */ public static final int VK_PERIOD = 0x2E; /** * Constant for the forward slash key, "/" */ public static final int VK_SLASH = 0x2F; /** VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */ public static final int VK_0 = 0x30; public static final int VK_1 = 0x31; public static final int VK_2 = 0x32; public static final int VK_3 = 0x33; public static final int VK_4 = 0x34; public static final int VK_5 = 0x35; public static final int VK_6 = 0x36; public static final int VK_7 = 0x37; public static final int VK_8 = 0x38; public static final int VK_9 = 0x39; /** * Constant for the semicolon key, ";" */ public static final int VK_SEMICOLON = 0x3B; /** * Constant for the equals key, "=" */ public static final int VK_EQUALS = 0x3D; /** VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */ public static final int VK_A = 0x41; public static final int VK_B = 0x42; public static final int VK_C = 0x43; public static final int VK_D = 0x44; public static final int VK_E = 0x45; public static final int VK_F = 0x46; public static final int VK_G = 0x47; public static final int VK_H = 0x48; public static final int VK_I = 0x49; public static final int VK_J = 0x4A; public static final int VK_K = 0x4B; public static final int VK_L = 0x4C; public static final int VK_M = 0x4D; public static final int VK_N = 0x4E; public static final int VK_O = 0x4F; public static final int VK_P = 0x50; public static final int VK_Q = 0x51; public static final int VK_R = 0x52; public static final int VK_S = 0x53; public static final int VK_T = 0x54; public static final int VK_U = 0x55; public static final int VK_V = 0x56; public static final int VK_W = 0x57; public static final int VK_X = 0x58; public static final int VK_Y = 0x59; public static final int VK_Z = 0x5A; /** * Constant for the open bracket key, "[" */ public static final int VK_OPEN_BRACKET = 0x5B; /** * Constant for the back slash key, "\" */ public static final int VK_BACK_SLASH = 0x5C; /** * Constant for the close bracket key, "]" */ public static final int VK_CLOSE_BRACKET = 0x5D; public static final int VK_NUMPAD0 = 0x60; public static final int VK_NUMPAD1 = 0x61; public static final int VK_NUMPAD2 = 0x62; public static final int VK_NUMPAD3 = 0x63; public static final int VK_NUMPAD4 = 0x64; public static final int VK_NUMPAD5 = 0x65; public static final int VK_NUMPAD6 = 0x66; public static final int VK_NUMPAD7 = 0x67; public static final int VK_NUMPAD8 = 0x68; public static final int VK_NUMPAD9 = 0x69; public static final int VK_MULTIPLY = 0x6A; public static final int VK_ADD = 0x6B; /** * This constant is obsolete, and is included only for backwards * compatibility. * @see #VK_SEPARATOR */ public static final int VK_SEPARATER = 0x6C; /** * Constant for the Numpad Separator key. * @since 1.4 */ public static final int VK_SEPARATOR = VK_SEPARATER; public static final int VK_SUBTRACT = 0x6D; public static final int VK_DECIMAL = 0x6E; public static final int VK_DIVIDE = 0x6F; public static final int VK_DELETE = 0x7F; /* ASCII DEL */ public static final int VK_NUM_LOCK = 0x90; public static final int VK_SCROLL_LOCK = 0x91; /** Constant for the F1 function key. */ public static final int VK_F1 = 0x70; /** Constant for the F2 function key. */ public static final int VK_F2 = 0x71; /** Constant for the F3 function key. */ public static final int VK_F3 = 0x72; /** Constant for the F4 function key. */ public static final int VK_F4 = 0x73; /** Constant for the F5 function key. */ public static final int VK_F5 = 0x74; /** Constant for the F6 function key. */ public static final int VK_F6 = 0x75; /** Constant for the F7 function key. */ public static final int VK_F7 = 0x76; /** Constant for the F8 function key. */ public static final int VK_F8 = 0x77; /** Constant for the F9 function key. */ public static final int VK_F9 = 0x78; /** Constant for the F10 function key. */ public static final int VK_F10 = 0x79; /** Constant for the F11 function key. */ public static final int VK_F11 = 0x7A; /** Constant for the F12 function key. */ public static final int VK_F12 = 0x7B; /** * Constant for the F13 function key. * @since 1.2 */ /* F13 - F24 are used on IBM 3270 keyboard; use random range for constants. */ public static final int VK_F13 = 0xF000; /** * Constant for the F14 function key. * @since 1.2 */ public static final int VK_F14 = 0xF001; /** * Constant for the F15 function key. * @since 1.2 */ public static final int VK_F15 = 0xF002; /** * Constant for the F16 function key. * @since 1.2 */ public static final int VK_F16 = 0xF003; /** * Constant for the F17 function key. * @since 1.2 */ public static final int VK_F17 = 0xF004; /** * Constant for the F18 function key. * @since 1.2 */ public static final int VK_F18 = 0xF005; /** * Constant for the F19 function key. * @since 1.2 */ public static final int VK_F19 = 0xF006; /** * Constant for the F20 function key. * @since 1.2 */ public static final int VK_F20 = 0xF007; /** * Constant for the F21 function key. * @since 1.2 */ public static final int VK_F21 = 0xF008; /** * Constant for the F22 function key. * @since 1.2 */ public static final int VK_F22 = 0xF009; /** * Constant for the F23 function key. * @since 1.2 */ public static final int VK_F23 = 0xF00A; /** * Constant for the F24 function key. * @since 1.2 */ public static final int VK_F24 = 0xF00B; public static final int VK_PRINTSCREEN = 0x9A; public static final int VK_INSERT = 0x9B; public static final int VK_HELP = 0x9C; public static final int VK_META = 0x9D; public static final int VK_BACK_QUOTE = 0xC0; public static final int VK_QUOTE = 0xDE; /** * Constant for the numeric keypad <b>up</b> arrow key. * @see #VK_UP * @since 1.2 */ public static final int VK_KP_UP = 0xE0; /** * Constant for the numeric keypad <b>down</b> arrow key. * @see #VK_DOWN * @since 1.2 */ public static final int VK_KP_DOWN = 0xE1; /** * Constant for the numeric keypad <b>left</b> arrow key. * @see #VK_LEFT * @since 1.2 */ public static final int VK_KP_LEFT = 0xE2; /** * Constant for the numeric keypad <b>right</b> arrow key. * @see #VK_RIGHT * @since 1.2 */ public static final int VK_KP_RIGHT = 0xE3; /* For European keyboards */ /** @since 1.2 */ public static final int VK_DEAD_GRAVE = 0x80; /** @since 1.2 */ public static final int VK_DEAD_ACUTE = 0x81; /** @since 1.2 */ public static final int VK_DEAD_CIRCUMFLEX = 0x82; /** @since 1.2 */ public static final int VK_DEAD_TILDE = 0x83; /** @since 1.2 */ public static final int VK_DEAD_MACRON = 0x84; /** @since 1.2 */ public static final int VK_DEAD_BREVE = 0x85; /** @since 1.2 */ public static final int VK_DEAD_ABOVEDOT = 0x86; /** @since 1.2 */ public static final int VK_DEAD_DIAERESIS = 0x87; /** @since 1.2 */ public static final int VK_DEAD_ABOVERING = 0x88; /** @since 1.2 */ public static final int VK_DEAD_DOUBLEACUTE = 0x89; /** @since 1.2 */ public static final int VK_DEAD_CARON = 0x8a; /** @since 1.2 */ public static final int VK_DEAD_CEDILLA = 0x8b; /** @since 1.2 */ public static final int VK_DEAD_OGONEK = 0x8c; /** @since 1.2 */ public static final int VK_DEAD_IOTA = 0x8d; /** @since 1.2 */ public static final int VK_DEAD_VOICED_SOUND = 0x8e; /** @since 1.2 */ public static final int VK_DEAD_SEMIVOICED_SOUND = 0x8f; /** @since 1.2 */ public static final int VK_AMPERSAND = 0x96; /** @since 1.2 */ public static final int VK_ASTERISK = 0x97; /** @since 1.2 */ public static final int VK_QUOTEDBL = 0x98; /** @since 1.2 */ public static final int VK_LESS = 0x99; /** @since 1.2 */ public static final int VK_GREATER = 0xa0; /** @since 1.2 */ public static final int VK_BRACELEFT = 0xa1; /** @since 1.2 */ public static final int VK_BRACERIGHT = 0xa2; /** * Constant for the "@" key. * @since 1.2 */ public static final int VK_AT = 0x0200; /** * Constant for the ":" key. * @since 1.2 */ public static final int VK_COLON = 0x0201; /** * Constant for the "^" key. * @since 1.2 */ public static final int VK_CIRCUMFLEX = 0x0202; /** * Constant for the "$" key. * @since 1.2 */ public static final int VK_DOLLAR = 0x0203; /** * Constant for the Euro currency sign key. * @since 1.2 */ public static final int VK_EURO_SIGN = 0x0204; /** * Constant for the "!" key. * @since 1.2 */ public static final int VK_EXCLAMATION_MARK = 0x0205; /** * Constant for the inverted exclamation mark key. * @since 1.2 */ public static final int VK_INVERTED_EXCLAMATION_MARK = 0x0206; /** * Constant for the "(" key. * @since 1.2 */ public static final int VK_LEFT_PARENTHESIS = 0x0207; /** * Constant for the "#" key. * @since 1.2 */ public static final int VK_NUMBER_SIGN = 0x0208; /** * Constant for the "+" key. * @since 1.2 */ public static final int VK_PLUS = 0x0209; /** * Constant for the ")" key. * @since 1.2 */ public static final int VK_RIGHT_PARENTHESIS = 0x020A; /** * Constant for the "_" key. * @since 1.2 */ public static final int VK_UNDERSCORE = 0x020B; /** * Constant for the Microsoft Windows "Windows" key. * It is used for both the left and right version of the key. * @see #getKeyLocation() * @since 1.5 */ public static final int VK_WINDOWS = 0x020C; /** * Constant for the Microsoft Windows Context Menu key. * @since 1.5 */ public static final int VK_CONTEXT_MENU = 0x020D; /* for input method support on Asian Keyboards */ /* not clear what this means - listed in Microsoft Windows API */ public static final int VK_FINAL = 0x0018; /** Constant for the Convert function key. */ /* Japanese PC 106 keyboard, Japanese Solaris keyboard: henkan */ public static final int VK_CONVERT = 0x001C; /** Constant for the Don't Convert function key. */ /* Japanese PC 106 keyboard: muhenkan */ public static final int VK_NONCONVERT = 0x001D; /** Constant for the Accept or Commit function key. */ /* Japanese Solaris keyboard: kakutei */ public static final int VK_ACCEPT = 0x001E; /* not clear what this means - listed in Microsoft Windows API */ public static final int VK_MODECHANGE = 0x001F; /* replaced by VK_KANA_LOCK for Microsoft Windows and Solaris; might still be used on other platforms */ public static final int VK_KANA = 0x0015; /* replaced by VK_INPUT_METHOD_ON_OFF for Microsoft Windows and Solaris; might still be used for other platforms */ public static final int VK_KANJI = 0x0019; /** * Constant for the Alphanumeric function key. * @since 1.2 */ /* Japanese PC 106 keyboard: eisuu */ public static final int VK_ALPHANUMERIC = 0x00F0; /** * Constant for the Katakana function key. * @since 1.2 */ /* Japanese PC 106 keyboard: katakana */ public static final int VK_KATAKANA = 0x00F1; /** * Constant for the Hiragana function key. * @since 1.2 */ /* Japanese PC 106 keyboard: hiragana */ public static final int VK_HIRAGANA = 0x00F2; /** * Constant for the Full-Width Characters function key. * @since 1.2 */ /* Japanese PC 106 keyboard: zenkaku */ public static final int VK_FULL_WIDTH = 0x00F3; /** * Constant for the Half-Width Characters function key. * @since 1.2 */ /* Japanese PC 106 keyboard: hankaku */ public static final int VK_HALF_WIDTH = 0x00F4; /** * Constant for the Roman Characters function key. * @since 1.2 */ /* Japanese PC 106 keyboard: roumaji */ public static final int VK_ROMAN_CHARACTERS = 0x00F5; /** * Constant for the All Candidates function key. * @since 1.2 */ /* Japanese PC 106 keyboard - VK_CONVERT + ALT: zenkouho */ public static final int VK_ALL_CANDIDATES = 0x0100; /** * Constant for the Previous Candidate function key. * @since 1.2 */ /* Japanese PC 106 keyboard - VK_CONVERT + SHIFT: maekouho */ public static final int VK_PREVIOUS_CANDIDATE = 0x0101; /** * Constant for the Code Input function key. * @since 1.2 */ /* Japanese PC 106 keyboard - VK_ALPHANUMERIC + ALT: kanji bangou */ public static final int VK_CODE_INPUT = 0x0102; /** * Constant for the Japanese-Katakana function key. * This key switches to a Japanese input method and selects its Katakana input mode. * @since 1.2 */ /* Japanese Macintosh keyboard - VK_JAPANESE_HIRAGANA + SHIFT */ public static final int VK_JAPANESE_KATAKANA = 0x0103; /** * Constant for the Japanese-Hiragana function key. * This key switches to a Japanese input method and selects its Hiragana input mode. * @since 1.2 */ /* Japanese Macintosh keyboard */ public static final int VK_JAPANESE_HIRAGANA = 0x0104; /** * Constant for the Japanese-Roman function key. * This key switches to a Japanese input method and selects its Roman-Direct input mode. * @since 1.2 */ /* Japanese Macintosh keyboard */ public static final int VK_JAPANESE_ROMAN = 0x0105; /** * Constant for the locking Kana function key. * This key locks the keyboard into a Kana layout. * @since 1.3 */ /* Japanese PC 106 keyboard with special Windows driver - eisuu + Control; Japanese Solaris keyboard: kana */ public static final int VK_KANA_LOCK = 0x0106; /** * Constant for the input method on/off key. * @since 1.3 */ /* Japanese PC 106 keyboard: kanji. Japanese Solaris keyboard: nihongo */ public static final int VK_INPUT_METHOD_ON_OFF = 0x0107; /* for Sun keyboards */ /** @since 1.2 */ public static final int VK_CUT = 0xFFD1; /** @since 1.2 */ public static final int VK_COPY = 0xFFCD; /** @since 1.2 */ public static final int VK_PASTE = 0xFFCF; /** @since 1.2 */ public static final int VK_UNDO = 0xFFCB; /** @since 1.2 */ public static final int VK_AGAIN = 0xFFC9; /** @since 1.2 */ public static final int VK_FIND = 0xFFD0; /** @since 1.2 */ public static final int VK_PROPS = 0xFFCA; /** @since 1.2 */ public static final int VK_STOP = 0xFFC8; /** * Constant for the Compose function key. * @since 1.2 */ public static final int VK_COMPOSE = 0xFF20; /** * Constant for the AltGraph function key. * @since 1.2 */ public static final int VK_ALT_GRAPH = 0xFF7E; /** * Constant for the Begin key. * @since 1.5 */ public static final int VK_BEGIN = 0xFF58; /** * This value is used to indicate that the keyCode is unknown. * KEY_TYPED events do not have a keyCode value; this value * is used instead. */ public static final int VK_UNDEFINED = 0x0; /** * KEY_PRESSED and KEY_RELEASED events which do not map to a * valid Unicode character use this for the keyChar value. */ public static final char CHAR_UNDEFINED = 0xFFFF; /** * A constant indicating that the keyLocation is indeterminate * or not relevant. * <code>KEY_TYPED</code> events do not have a keyLocation; this value * is used instead. * @since 1.4 */ public static final int KEY_LOCATION_UNKNOWN = 0; /** * A constant indicating that the key pressed or released * is not distinguished as the left or right version of a key, * and did not originate on the numeric keypad (or did not * originate with a virtual key corresponding to the numeric * keypad). * @since 1.4 */ public static final int KEY_LOCATION_STANDARD = 1; /** * A constant indicating that the key pressed or released is in * the left key location (there is more than one possible location * for this key). Example: the left shift key. * @since 1.4 */ public static final int KEY_LOCATION_LEFT = 2; /** * A constant indicating that the key pressed or released is in * the right key location (there is more than one possible location * for this key). Example: the right shift key. * @since 1.4 */ public static final int KEY_LOCATION_RIGHT = 3; /** * A constant indicating that the key event originated on the * numeric keypad or with a virtual key corresponding to the * numeric keypad. * @since 1.4 */ public static final int KEY_LOCATION_NUMPAD = 4; }} | 2015-08-18 00:52:39 |
Recognizer | Recognition Result | Visualize | Recalc |
---|---|---|---|
#308 | javax.imageio.IIOException: Can't get input stream from URL! | [visualize] |
Snippet ID: | #176 |
Snippet name: | Java event codes (for GUIs) |
Eternal ID of this version: | #176/1 |
Text MD5: | 1c4596042f94c9966e8e93338f5e85cd |
Author: | stefan |
Category: | reference |
Type: | Document |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2014-01-16 00:48:07 |
Source code size: | 22159 bytes / 664 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 1220 / 322 |
Referenced in: | [show references] |