Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // <include src="keyboard_overlay_data.js"> | 5 // <include src="keyboard_overlay_data.js"> |
| 6 | 6 |
| 7 var BASE_KEYBOARD = { | 7 var BASE_KEYBOARD = { |
| 8 top: 0, | 8 top: 0, |
| 9 left: 0, | 9 left: 0, |
| 10 width: 1237, | 10 width: 1237, |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 38 var LABEL_TO_IDENTIFIER = { | 38 var LABEL_TO_IDENTIFIER = { |
| 39 'search': 'E0 5B', | 39 'search': 'E0 5B', |
| 40 'ctrl': '1D', | 40 'ctrl': '1D', |
| 41 'alt': '38', | 41 'alt': '38', |
| 42 'caps lock': '3A', | 42 'caps lock': '3A', |
| 43 'esc': '01', | 43 'esc': '01', |
| 44 'backspace': '0E', | 44 'backspace': '0E', |
| 45 'disabled': 'DISABLED' | 45 'disabled': 'DISABLED' |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 // This mapping is maintained for keyboard_overlay_ui_browsertest. | |
|
Lei Zhang
2017/04/12 22:40:10
Rather, "for KeyboardOverlayUIBrowserTest."
wutao
2017/04/12 22:53:30
Done.
| |
| 48 var KEYCODE_TO_LABEL = { | 49 var KEYCODE_TO_LABEL = { |
| 49 8: 'backspace', | 50 8: 'backspace', |
| 50 9: 'tab', | 51 9: 'tab', |
| 52 10: 'shift', | |
| 51 13: 'enter', | 53 13: 'enter', |
| 52 27: 'esc', | 54 27: 'esc', |
| 53 32: 'space', | 55 32: 'space', |
| 54 33: 'pageup', | 56 33: 'pageup', |
| 55 34: 'pagedown', | 57 34: 'pagedown', |
| 56 35: 'end', | 58 35: 'end', |
| 57 36: 'home', | 59 36: 'home', |
| 58 37: 'left', | 60 37: 'left', |
| 59 38: 'up', | 61 38: 'up', |
| 60 39: 'right', | 62 39: 'right', |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 80 112: 'back', | 82 112: 'back', |
| 81 113: 'forward', | 83 113: 'forward', |
| 82 114: 'reload', | 84 114: 'reload', |
| 83 115: 'full screen', | 85 115: 'full screen', |
| 84 116: 'switch window', | 86 116: 'switch window', |
| 85 117: 'bright down', | 87 117: 'bright down', |
| 86 118: 'bright up', | 88 118: 'bright up', |
| 87 119: 'mute', | 89 119: 'mute', |
| 88 120: 'vol. down', | 90 120: 'vol. down', |
| 89 121: 'vol. up', | 91 121: 'vol. up', |
| 92 152: 'power', | |
| 93 166: 'back', | |
| 94 167: 'forward', | |
| 95 168: 'reload', | |
| 96 173: 'mute', | |
| 97 174: 'vol. down', | |
| 98 175: 'vol. up', | |
| 99 183: 'full screen', | |
| 100 182: 'switch window', | |
| 90 186: ';', | 101 186: ';', |
| 91 187: '+', | 102 187: '+', |
| 92 188: ',', | 103 188: ',', |
| 93 189: '-', | 104 189: '-', |
| 94 190: '.', | 105 190: '.', |
| 95 191: '/', | 106 191: '/', |
| 96 192: '`', | 107 192: '`', |
| 108 216: 'bright down', | |
| 109 217: 'bright up', | |
| 110 218: 'bright down', | |
| 97 219: '[', | 111 219: '[', |
| 98 220: '\\', | 112 220: '\\', |
| 99 221: ']', | 113 221: ']', |
| 100 222: '\'', | 114 222: '\'', |
| 115 232: 'bright up', | |
| 101 }; | 116 }; |
| 102 | 117 |
| 103 /** | 118 /** |
| 104 * When the top row keys setting is changed so that they're treated as function | 119 * When the top row keys setting is changed so that they're treated as function |
| 105 * keys, their labels should change as well. | 120 * keys, their labels should change as well. |
| 106 */ | 121 */ |
| 107 var TOP_ROW_KEY_LABEL_TO_FUNCTION_LABEL = { | 122 var TOP_ROW_KEY_LABEL_TO_FUNCTION_LABEL = { |
| 108 'back' : 'f1', | 123 'back' : 'f1', |
| 109 'forward' : 'f2', | 124 'forward' : 'f2', |
| 110 'reload' : 'f3', | 125 'reload' : 'f3', |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 937 function onWidgetShown() { | 952 function onWidgetShown() { |
| 938 setTimeout(function() { | 953 setTimeout(function() { |
| 939 // Show and focus the instructions div after a delay so that chrome vox | 954 // Show and focus the instructions div after a delay so that chrome vox |
| 940 // speaks it correctly. | 955 // speaks it correctly. |
| 941 $('instructions').style.visibility = 'visible'; | 956 $('instructions').style.visibility = 'visible'; |
| 942 $('instructions').focus(); | 957 $('instructions').focus(); |
| 943 }, 500); | 958 }, 500); |
| 944 } | 959 } |
| 945 | 960 |
| 946 document.addEventListener('DOMContentLoaded', init); | 961 document.addEventListener('DOMContentLoaded', init); |
| OLD | NEW |