| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 // WARNING: Do not edit - generated code. | |
| 6 | |
| 7 interface KeyboardEvent extends UIEvent { | |
| 8 | |
| 9 static final int KEY_LOCATION_LEFT = 0x01; | |
| 10 | |
| 11 static final int KEY_LOCATION_NUMPAD = 0x03; | |
| 12 | |
| 13 static final int KEY_LOCATION_RIGHT = 0x02; | |
| 14 | |
| 15 static final int KEY_LOCATION_STANDARD = 0x00; | |
| 16 | |
| 17 bool get altGraphKey(); | |
| 18 | |
| 19 bool get altKey(); | |
| 20 | |
| 21 bool get ctrlKey(); | |
| 22 | |
| 23 String get keyIdentifier(); | |
| 24 | |
| 25 int get keyLocation(); | |
| 26 | |
| 27 bool get metaKey(); | |
| 28 | |
| 29 bool get shiftKey(); | |
| 30 | |
| 31 bool getModifierState(String keyIdentifierArg); | |
| 32 | |
| 33 void initKeyboardEvent(String type, bool canBubble, bool cancelable, Window vi
ew, String keyIdentifier, int keyLocation, bool ctrlKey, bool altKey, bool shift
Key, bool metaKey, bool altGraphKey); | |
| 34 } | |
| 35 | |
| 36 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
| 37 // for details. All rights reserved. Use of this source code is governed by a | |
| 38 // BSD-style license that can be found in the LICENSE file. | |
| 39 | |
| 40 /** | |
| 41 * Defines the standard key locations returned by | |
| 42 * KeyboardEvent.getKeyLocation. | |
| 43 */ | |
| 44 interface KeyLocation { | |
| 45 | |
| 46 /** | |
| 47 * The event key is not distinguished as the left or right version | |
| 48 * of the key, and did not originate from the numeric keypad (or did not | |
| 49 * originate with a virtual key corresponding to the numeric keypad). | |
| 50 */ | |
| 51 static final int STANDARD = 0; | |
| 52 | |
| 53 /** | |
| 54 * The event key is in the left key location. | |
| 55 */ | |
| 56 static final int LEFT = 1; | |
| 57 | |
| 58 /** | |
| 59 * The event key is in the right key location. | |
| 60 */ | |
| 61 static final int RIGHT = 2; | |
| 62 | |
| 63 /** | |
| 64 * The event key originated on the numeric keypad or with a virtual key | |
| 65 * corresponding to the numeric keypad. | |
| 66 */ | |
| 67 static final int NUMPAD = 3; | |
| 68 | |
| 69 /** | |
| 70 * The event key originated on a mobile device, either on a physical | |
| 71 * keypad or a virtual keyboard. | |
| 72 */ | |
| 73 static final int MOBILE = 4; | |
| 74 | |
| 75 /** | |
| 76 * The event key originated on a game controller or a joystick on a mobile | |
| 77 * device. | |
| 78 */ | |
| 79 static final int JOYSTICK = 5; | |
| 80 } | |
| 81 | |
| 82 /** | |
| 83 * Defines the standard keyboard identifier names for keys that are returned | |
| 84 * by KeyEvent.getKeyboardIdentifier when the key does not have a direct | |
| 85 * unicode mapping. | |
| 86 */ | |
| 87 interface KeyName { | |
| 88 | |
| 89 /** The Accept (Commit, OK) key */ | |
| 90 static final String ACCEPT = "Accept"; | |
| 91 | |
| 92 /** The Add key */ | |
| 93 static final String ADD = "Add"; | |
| 94 | |
| 95 /** The Again key */ | |
| 96 static final String AGAIN = "Again"; | |
| 97 | |
| 98 /** The All Candidates key */ | |
| 99 static final String ALL_CANDIDATES = "AllCandidates"; | |
| 100 | |
| 101 /** The Alphanumeric key */ | |
| 102 static final String ALPHANUMERIC = "Alphanumeric"; | |
| 103 | |
| 104 /** The Alt (Menu) key */ | |
| 105 static final String ALT = "Alt"; | |
| 106 | |
| 107 /** The Alt-Graph key */ | |
| 108 static final String ALT_GRAPH = "AltGraph"; | |
| 109 | |
| 110 /** The Application key */ | |
| 111 static final String APPS = "Apps"; | |
| 112 | |
| 113 /** The ATTN key */ | |
| 114 static final String ATTN = "Attn"; | |
| 115 | |
| 116 /** The Browser Back key */ | |
| 117 static final String BROWSER_BACK = "BrowserBack"; | |
| 118 | |
| 119 /** The Browser Favorites key */ | |
| 120 static final String BROWSER_FAVORTIES = "BrowserFavorites"; | |
| 121 | |
| 122 /** The Browser Forward key */ | |
| 123 static final String BROWSER_FORWARD = "BrowserForward"; | |
| 124 | |
| 125 /** The Browser Home key */ | |
| 126 static final String BROWSER_NAME = "BrowserHome"; | |
| 127 | |
| 128 /** The Browser Refresh key */ | |
| 129 static final String BROWSER_REFRESH = "BrowserRefresh"; | |
| 130 | |
| 131 /** The Browser Search key */ | |
| 132 static final String BROWSER_SEARCH = "BrowserSearch"; | |
| 133 | |
| 134 /** The Browser Stop key */ | |
| 135 static final String BROWSER_STOP = "BrowserStop"; | |
| 136 | |
| 137 /** The Camera key */ | |
| 138 static final String CAMERA = "Camera"; | |
| 139 | |
| 140 /** The Caps Lock (Capital) key */ | |
| 141 static final String CAPS_LOCK = "CapsLock"; | |
| 142 | |
| 143 /** The Clear key */ | |
| 144 static final String CLEAR = "Clear"; | |
| 145 | |
| 146 /** The Code Input key */ | |
| 147 static final String CODE_INPUT = "CodeInput"; | |
| 148 | |
| 149 /** The Compose key */ | |
| 150 static final String COMPOSE = "Compose"; | |
| 151 | |
| 152 /** The Control (Ctrl) key */ | |
| 153 static final String CONTROL = "Control"; | |
| 154 | |
| 155 /** The Crsel key */ | |
| 156 static final String CRSEL = "Crsel"; | |
| 157 | |
| 158 /** The Convert key */ | |
| 159 static final String CONVERT = "Convert"; | |
| 160 | |
| 161 /** The Copy key */ | |
| 162 static final String COPY = "Copy"; | |
| 163 | |
| 164 /** The Cut key */ | |
| 165 static final String CUT = "Cut"; | |
| 166 | |
| 167 /** The Decimal key */ | |
| 168 static final String DECIMAL = "Decimal"; | |
| 169 | |
| 170 /** The Divide key */ | |
| 171 static final String DIVIDE = "Divide"; | |
| 172 | |
| 173 /** The Down Arrow key */ | |
| 174 static final String DOWN = "Down"; | |
| 175 | |
| 176 /** The diagonal Down-Left Arrow key */ | |
| 177 static final String DOWN_LEFT = "DownLeft"; | |
| 178 | |
| 179 /** The diagonal Down-Right Arrow key */ | |
| 180 static final String DOWN_RIGHT = "DownRight"; | |
| 181 | |
| 182 /** The Eject key */ | |
| 183 static final String EJECT = "Eject"; | |
| 184 | |
| 185 /** The End key */ | |
| 186 static final String END = "End"; | |
| 187 | |
| 188 /** | |
| 189 * The Enter key. Note: This key value must also be used for the Return | |
| 190 * (Macintosh numpad) key | |
| 191 */ | |
| 192 static final String ENTER = "Enter"; | |
| 193 | |
| 194 /** The Erase EOF key */ | |
| 195 static final String ERASE_EOF= "EraseEof"; | |
| 196 | |
| 197 /** The Execute key */ | |
| 198 static final String EXECUTE = "Execute"; | |
| 199 | |
| 200 /** The Exsel key */ | |
| 201 static final String EXSEL = "Exsel"; | |
| 202 | |
| 203 /** The Function switch key */ | |
| 204 static final String FN = "Fn"; | |
| 205 | |
| 206 /** The F1 key */ | |
| 207 static final String F1 = "F1"; | |
| 208 | |
| 209 /** The F2 key */ | |
| 210 static final String F2 = "F2"; | |
| 211 | |
| 212 /** The F3 key */ | |
| 213 static final String F3 = "F3"; | |
| 214 | |
| 215 /** The F4 key */ | |
| 216 static final String F4 = "F4"; | |
| 217 | |
| 218 /** The F5 key */ | |
| 219 static final String F5 = "F5"; | |
| 220 | |
| 221 /** The F6 key */ | |
| 222 static final String F6 = "F6"; | |
| 223 | |
| 224 /** The F7 key */ | |
| 225 static final String F7 = "F7"; | |
| 226 | |
| 227 /** The F8 key */ | |
| 228 static final String F8 = "F8"; | |
| 229 | |
| 230 /** The F9 key */ | |
| 231 static final String F9 = "F9"; | |
| 232 | |
| 233 /** The F10 key */ | |
| 234 static final String F10 = "F10"; | |
| 235 | |
| 236 /** The F11 key */ | |
| 237 static final String F11 = "F11"; | |
| 238 | |
| 239 /** The F12 key */ | |
| 240 static final String F12 = "F12"; | |
| 241 | |
| 242 /** The F13 key */ | |
| 243 static final String F13 = "F13"; | |
| 244 | |
| 245 /** The F14 key */ | |
| 246 static final String F14 = "F14"; | |
| 247 | |
| 248 /** The F15 key */ | |
| 249 static final String F15 = "F15"; | |
| 250 | |
| 251 /** The F16 key */ | |
| 252 static final String F16 = "F16"; | |
| 253 | |
| 254 /** The F17 key */ | |
| 255 static final String F17 = "F17"; | |
| 256 | |
| 257 /** The F18 key */ | |
| 258 static final String F18 = "F18"; | |
| 259 | |
| 260 /** The F19 key */ | |
| 261 static final String F19 = "F19"; | |
| 262 | |
| 263 /** The F20 key */ | |
| 264 static final String F20 = "F20"; | |
| 265 | |
| 266 /** The F21 key */ | |
| 267 static final String F21 = "F21"; | |
| 268 | |
| 269 /** The F22 key */ | |
| 270 static final String F22 = "F22"; | |
| 271 | |
| 272 /** The F23 key */ | |
| 273 static final String F23 = "F23"; | |
| 274 | |
| 275 /** The F24 key */ | |
| 276 static final String F24 = "F24"; | |
| 277 | |
| 278 /** The Final Mode (Final) key used on some asian keyboards */ | |
| 279 static final String FINAL_MODE = "FinalMode"; | |
| 280 | |
| 281 /** The Find key */ | |
| 282 static final String FIND = "Find"; | |
| 283 | |
| 284 /** The Full-Width Characters key */ | |
| 285 static final String FULL_WIDTH = "FullWidth"; | |
| 286 | |
| 287 /** The Half-Width Characters key */ | |
| 288 static final String HALF_WIDTH = "HalfWidth"; | |
| 289 | |
| 290 /** The Hangul (Korean characters) Mode key */ | |
| 291 static final String HANGUL_MODE = "HangulMode"; | |
| 292 | |
| 293 /** The Hanja (Korean characters) Mode key */ | |
| 294 static final String HANJA_MODE = "HanjaMode"; | |
| 295 | |
| 296 /** The Help key */ | |
| 297 static final String HELP = "Help"; | |
| 298 | |
| 299 /** The Hiragana (Japanese Kana characters) key */ | |
| 300 static final String HIRAGANA = "Hiragana"; | |
| 301 | |
| 302 /** The Home key */ | |
| 303 static final String HOME = "Home"; | |
| 304 | |
| 305 /** The Insert (Ins) key */ | |
| 306 static final String INSERT = "Insert"; | |
| 307 | |
| 308 /** The Japanese-Hiragana key */ | |
| 309 static final String JAPANESE_HIRAGANA = "JapaneseHiragana"; | |
| 310 | |
| 311 /** The Japanese-Katakana key */ | |
| 312 static final String JAPANESE_KATAKANA = "JapaneseKatakana"; | |
| 313 | |
| 314 /** The Japanese-Romaji key */ | |
| 315 static final String JAPANESE_ROMAJI = "JapaneseRomaji"; | |
| 316 | |
| 317 /** The Junja Mode key */ | |
| 318 static final String JUNJA_MODE = "JunjaMode"; | |
| 319 | |
| 320 /** The Kana Mode (Kana Lock) key */ | |
| 321 static final String KANA_MODE = "KanaMode"; | |
| 322 | |
| 323 /** | |
| 324 * The Kanji (Japanese name for ideographic characters of Chinese origin) | |
| 325 * Mode key | |
| 326 */ | |
| 327 static final String KANJI_MODE = "KanjiMode"; | |
| 328 | |
| 329 /** The Katakana (Japanese Kana characters) key */ | |
| 330 static final String KATAKANA = "Katakana"; | |
| 331 | |
| 332 /** The Start Application One key */ | |
| 333 static final String LAUNCH_APPLICATION_1 = "LaunchApplication1"; | |
| 334 | |
| 335 /** The Start Application Two key */ | |
| 336 static final String LAUNCH_APPLICATION_2 = "LaunchApplication2"; | |
| 337 | |
| 338 /** The Start Mail key */ | |
| 339 static final String LAUNCH_MAIL = "LaunchMail"; | |
| 340 | |
| 341 /** The Left Arrow key */ | |
| 342 static final String LEFT = "Left"; | |
| 343 | |
| 344 /** The Menu key */ | |
| 345 static final String MENU = "Menu"; | |
| 346 | |
| 347 /** | |
| 348 * The Meta key. Note: This key value shall be also used for the Apple | |
| 349 * Command key | |
| 350 */ | |
| 351 static final String META = "Meta"; | |
| 352 | |
| 353 /** The Media Next Track key */ | |
| 354 static final String MEDIA_NEXT_TRACK = "MediaNextTrack"; | |
| 355 | |
| 356 /** The Media Play Pause key */ | |
| 357 static final String MEDIA_PAUSE_PLAY = "MediaPlayPause"; | |
| 358 | |
| 359 /** The Media Previous Track key */ | |
| 360 static final String MEDIA_PREVIOUS_TRACK = "MediaPreviousTrack"; | |
| 361 | |
| 362 /** The Media Stop key */ | |
| 363 static final String MEDIA_STOP = "MediaStop"; | |
| 364 | |
| 365 /** The Mode Change key */ | |
| 366 static final String MODE_CHANGE = "ModeChange"; | |
| 367 | |
| 368 /** The Next Candidate function key */ | |
| 369 static final String NEXT_CANDIDATE = "NextCandidate"; | |
| 370 | |
| 371 /** The Nonconvert (Don't Convert) key */ | |
| 372 static final String NON_CONVERT = "Nonconvert"; | |
| 373 | |
| 374 /** The Number Lock key */ | |
| 375 static final String NUM_LOCK = "NumLock"; | |
| 376 | |
| 377 /** The Page Down (Next) key */ | |
| 378 static final String PAGE_DOWN = "PageDown"; | |
| 379 | |
| 380 /** The Page Up key */ | |
| 381 static final String PAGE_UP = "PageUp"; | |
| 382 | |
| 383 /** The Paste key */ | |
| 384 static final String PASTE = "Paste"; | |
| 385 | |
| 386 /** The Pause key */ | |
| 387 static final String PAUSE = "Pause"; | |
| 388 | |
| 389 /** The Play key */ | |
| 390 static final String PLAY = "Play"; | |
| 391 | |
| 392 /** | |
| 393 * The Power key. Note: Some devices may not expose this key to the | |
| 394 * operating environment | |
| 395 */ | |
| 396 static final String POWER = "Power"; | |
| 397 | |
| 398 /** The Previous Candidate function key */ | |
| 399 static final String PREVIOUS_CANDIDATE = "PreviousCandidate"; | |
| 400 | |
| 401 /** The Print Screen (PrintScrn, SnapShot) key */ | |
| 402 static final String PRINT_SCREEN = "PrintScreen"; | |
| 403 | |
| 404 /** The Process key */ | |
| 405 static final String PROCESS = "Process"; | |
| 406 | |
| 407 /** The Props key */ | |
| 408 static final String PROPS = "Props"; | |
| 409 | |
| 410 /** The Right Arrow key */ | |
| 411 static final String RIGHT = "Right"; | |
| 412 | |
| 413 /** The Roman Characters function key */ | |
| 414 static final String ROMAN_CHARACTERS = "RomanCharacters"; | |
| 415 | |
| 416 /** The Scroll Lock key */ | |
| 417 static final String SCROLL = "Scroll"; | |
| 418 | |
| 419 /** The Select key */ | |
| 420 static final String SELECT = "Select"; | |
| 421 | |
| 422 /** The Select Media key */ | |
| 423 static final String SELECT_MEDIA = "SelectMedia"; | |
| 424 | |
| 425 /** The Separator key */ | |
| 426 static final String SEPARATOR = "Separator"; | |
| 427 | |
| 428 /** The Shift key */ | |
| 429 static final String SHIFT = "Shift"; | |
| 430 | |
| 431 /** The Soft1 key */ | |
| 432 static final String SOFT_1 = "Soft1"; | |
| 433 | |
| 434 /** The Soft2 key */ | |
| 435 static final String SOFT_2 = "Soft2"; | |
| 436 | |
| 437 /** The Soft3 key */ | |
| 438 static final String SOFT_3 = "Soft3"; | |
| 439 | |
| 440 /** The Soft4 key */ | |
| 441 static final String SOFT_4 = "Soft4"; | |
| 442 | |
| 443 /** The Stop key */ | |
| 444 static final String STOP = "Stop"; | |
| 445 | |
| 446 /** The Subtract key */ | |
| 447 static final String SUBTRACT = "Subtract"; | |
| 448 | |
| 449 /** The Symbol Lock key */ | |
| 450 static final String SYMBOL_LOCK = "SymbolLock"; | |
| 451 | |
| 452 /** The Up Arrow key */ | |
| 453 static final String UP = "Up"; | |
| 454 | |
| 455 /** The diagonal Up-Left Arrow key */ | |
| 456 static final String UP_LEFT = "UpLeft"; | |
| 457 | |
| 458 /** The diagonal Up-Right Arrow key */ | |
| 459 static final String UP_RIGHT = "UpRight"; | |
| 460 | |
| 461 /** The Undo key */ | |
| 462 static final String UNDO = "Undo"; | |
| 463 | |
| 464 /** The Volume Down key */ | |
| 465 static final String VOLUME_DOWN = "VolumeDown"; | |
| 466 | |
| 467 /** The Volume Mute key */ | |
| 468 static final String VOLUMN_MUTE = "VolumeMute"; | |
| 469 | |
| 470 /** The Volume Up key */ | |
| 471 static final String VOLUMN_UP = "VolumeUp"; | |
| 472 | |
| 473 /** The Windows Logo key */ | |
| 474 static final String WIN = "Win"; | |
| 475 | |
| 476 /** The Zoom key */ | |
| 477 static final String ZOOM = "Zoom"; | |
| 478 | |
| 479 /** | |
| 480 * The Backspace (Back) key. Note: This key value shall be also used for the | |
| 481 * key labeled 'delete' MacOS keyboards when not modified by the 'Fn' key | |
| 482 */ | |
| 483 static final String BACKSPACE = "Backspace"; | |
| 484 | |
| 485 /** The Horizontal Tabulation (Tab) key */ | |
| 486 static final String TAB = "Tab"; | |
| 487 | |
| 488 /** The Cancel key */ | |
| 489 static final String CANCEL = "Cancel"; | |
| 490 | |
| 491 /** The Escape (Esc) key */ | |
| 492 static final String ESC = "Esc"; | |
| 493 | |
| 494 /** The Space (Spacebar) key: */ | |
| 495 static final String SPACEBAR = "Spacebar"; | |
| 496 | |
| 497 /** | |
| 498 * The Delete (Del) Key. Note: This key value shall be also used for the key | |
| 499 * labeled 'delete' MacOS keyboards when modified by the 'Fn' key | |
| 500 */ | |
| 501 static final String DEL = "Del"; | |
| 502 | |
| 503 /** The Combining Grave Accent (Greek Varia, Dead Grave) key */ | |
| 504 static final String DEAD_GRAVE = "DeadGrave"; | |
| 505 | |
| 506 /** | |
| 507 * The Combining Acute Accent (Stress Mark, Greek Oxia, Tonos, Dead Eacute) | |
| 508 * key | |
| 509 */ | |
| 510 static final String DEAD_EACUTE = "DeadEacute"; | |
| 511 | |
| 512 /** The Combining Circumflex Accent (Hat, Dead Circumflex) key */ | |
| 513 static final String DEAD_CIRCUMFLEX = "DeadCircumflex"; | |
| 514 | |
| 515 /** The Combining Tilde (Dead Tilde) key */ | |
| 516 static final String DEAD_TILDE = "DeadTilde"; | |
| 517 | |
| 518 /** The Combining Macron (Long, Dead Macron) key */ | |
| 519 static final String DEAD_MACRON = "DeadMacron"; | |
| 520 | |
| 521 /** The Combining Breve (Short, Dead Breve) key */ | |
| 522 static final String DEAD_BREVE = "DeadBreve"; | |
| 523 | |
| 524 /** The Combining Dot Above (Derivative, Dead Above Dot) key */ | |
| 525 static final String DEAD_ABOVE_DOT = "DeadAboveDot"; | |
| 526 | |
| 527 /** | |
| 528 * The Combining Diaeresis (Double Dot Abode, Umlaut, Greek Dialytika, | |
| 529 * Double Derivative, Dead Diaeresis) key | |
| 530 */ | |
| 531 static final String DEAD_UMLAUT = "DeadUmlaut"; | |
| 532 | |
| 533 /** The Combining Ring Above (Dead Above Ring) key */ | |
| 534 static final String DEAD_ABOVE_RING = "DeadAboveRing"; | |
| 535 | |
| 536 /** The Combining Double Acute Accent (Dead Doubleacute) key */ | |
| 537 static final String DEAD_DOUBLEACUTE = "DeadDoubleacute"; | |
| 538 | |
| 539 /** The Combining Caron (Hacek, V Above, Dead Caron) key */ | |
| 540 static final String DEAD_CARON = "DeadCaron"; | |
| 541 | |
| 542 /** The Combining Cedilla (Dead Cedilla) key */ | |
| 543 static final String DEAD_CEDILLA = "DeadCedilla"; | |
| 544 | |
| 545 /** The Combining Ogonek (Nasal Hook, Dead Ogonek) key */ | |
| 546 static final String DEAD_OGONEK = "DeadOgonek"; | |
| 547 | |
| 548 /** | |
| 549 * The Combining Greek Ypogegrammeni (Greek Non-Spacing Iota Below, Iota | |
| 550 * Subscript, Dead Iota) key | |
| 551 */ | |
| 552 static final String DEAD_IOTA = "DeadIota"; | |
| 553 | |
| 554 /** | |
| 555 * The Combining Katakana-Hiragana Voiced Sound Mark (Dead Voiced Sound) key | |
| 556 */ | |
| 557 static final String DEAD_VOICED_SOUND = "DeadVoicedSound"; | |
| 558 | |
| 559 /** | |
| 560 * The Combining Katakana-Hiragana Semi-Voiced Sound Mark (Dead Semivoiced | |
| 561 * Sound) key | |
| 562 */ | |
| 563 static final String DEC_SEMIVOICED_SOUND= "DeadSemivoicedSound"; | |
| 564 | |
| 565 /** | |
| 566 * Key value used when an implementation is unable to identify another key | |
| 567 * value, due to either hardware, platform, or software constraints | |
| 568 */ | |
| 569 static final String UNIDENTIFIED = "Unidentified"; | |
| 570 } | |
| OLD | NEW |