| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 var BASE_KEYBOARD = { | 5 var BASE_KEYBOARD = { |
| 6 top: 0, | 6 top: 0, |
| 7 left: 0, | 7 left: 0, |
| 8 width: 1237, | 8 width: 1237, |
| 9 height: 514 | 9 height: 514 |
| 10 }; | 10 }; |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 | 312 |
| 313 /** | 313 /** |
| 314 * A callback function for onkeydown and onkeyup events. | 314 * A callback function for onkeydown and onkeyup events. |
| 315 */ | 315 */ |
| 316 function handleKeyEvent(e){ | 316 function handleKeyEvent(e){ |
| 317 var modifiers = getModifiers(e); | 317 var modifiers = getModifiers(e); |
| 318 if (!getKeyboardOverlayId()) { | 318 if (!getKeyboardOverlayId()) { |
| 319 return; | 319 return; |
| 320 } | 320 } |
| 321 update(modifiers); | 321 update(modifiers); |
| 322 KeyboardOverlayAccessibilityHelper.maybeSpeakAllShortcuts(modifiers); |
| 322 } | 323 } |
| 323 | 324 |
| 324 /** | 325 /** |
| 325 * Initializes the layout of the keys. | 326 * Initializes the layout of the keys. |
| 326 */ | 327 */ |
| 327 function initLayout() { | 328 function initLayout() { |
| 328 // Add data for the caps lock key | 329 // Add data for the caps lock key |
| 329 var keys = getKeyboardGlyphData().keys; | 330 var keys = getKeyboardGlyphData().keys; |
| 330 if (!('3A' in keys)) { | 331 if (!('3A' in keys)) { |
| 331 keys['3A'] = {label: 'caps lock', format: 'left'}; | 332 keys['3A'] = {label: 'caps lock', format: 'left'}; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 keyboardOverlayId = 'en_US'; | 454 keyboardOverlayId = 'en_US'; |
| 454 } | 455 } |
| 455 while(document.body.firstChild) { | 456 while(document.body.firstChild) { |
| 456 document.body.removeChild(document.body.firstChild); | 457 document.body.removeChild(document.body.firstChild); |
| 457 } | 458 } |
| 458 initLayout(); | 459 initLayout(); |
| 459 update([]); | 460 update([]); |
| 460 } | 461 } |
| 461 | 462 |
| 462 document.addEventListener('DOMContentLoaded', init); | 463 document.addEventListener('DOMContentLoaded', init); |
| OLD | NEW |