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