Chromium Code Reviews| Index: chrome/browser/resources/chromeos/switch_access/keyboard_handler.js |
| diff --git a/chrome/browser/resources/chromeos/switch_access/keyboard_handler.js b/chrome/browser/resources/chromeos/switch_access/keyboard_handler.js |
| index 901690f594341130f35ad6a27d4705825c56683c..c3832851c4cd1592618e8f6a48a35b80a355a4aa 100644 |
| --- a/chrome/browser/resources/chromeos/switch_access/keyboard_handler.js |
| +++ b/chrome/browser/resources/chromeos/switch_access/keyboard_handler.js |
| @@ -28,6 +28,11 @@ KeyboardHandler.prototype = { |
| * @private |
| */ |
| init_: function() { |
| + // Capture keycodes for keys 1 through 4, and 6 through 9. |
| + chrome.accessibilityPrivate.setSwitchAccessKeys( |
| + ['1'.charCodeAt(0), '2'.charCodeAt(0), '3'.charCodeAt(0), |
|
Devlin
2017/05/30 19:22:03
optional: to me, this would potentially be more re
elichtenberg
2017/05/31 00:58:43
Good idea. I changed it to an arrow function too,
|
| + '4'.charCodeAt(0), '6'.charCodeAt(0), '7'.charCodeAt(0), |
| + '8'.charCodeAt(0), '9'.charCodeAt(0)]); |
| document.addEventListener('keyup', this.handleKeyEvent_.bind(this)); |
| }, |