Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/common/key_sequence.js

Issue 479323002: Fix broken ChromeVox keyboard shortcuts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Proper fix Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /** 5 /**
6 * @fileoverview A JavaScript class that represents a sequence of keys entered 6 * @fileoverview A JavaScript class that represents a sequence of keys entered
7 * by the user. 7 * by the user.
8 */ 8 */
9 9
10 10
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 if (modifierKeyCombo.indexOf('Alt') != -1) { 240 if (modifierKeyCombo.indexOf('Alt') != -1) {
241 this.keys.altKey[index] = false; 241 this.keys.altKey[index] = false;
242 } 242 }
243 if (modifierKeyCombo.indexOf('Shift') != -1) { 243 if (modifierKeyCombo.indexOf('Shift') != -1) {
244 this.keys.shiftKey[index] = false; 244 this.keys.shiftKey[index] = false;
245 } 245 }
246 var metaKeyName = this.getMetaKeyName_(); 246 var metaKeyName = this.getMetaKeyName_();
247 if (modifierKeyCombo.indexOf(metaKeyName) != -1) { 247 if (modifierKeyCombo.indexOf(metaKeyName) != -1) {
248 if (metaKeyName == 'Search') { 248 if (metaKeyName == 'Search') {
249 this.keys.searchKeyHeld[index] = false; 249 this.keys.searchKeyHeld[index] = false;
250 // TODO(dmazzoni): http://crbug.com/404763 Get rid of the code that
251 // tracks the search key and just use meta everywhere.
252 if (cvox.ChromeVox.isChromeOS) {
David Tseng 2014/08/19 18:24:04 Is this needed (metaKeyName is only search on cros
dmazzoni 2014/08/19 19:59:26 You're right, it's redundant.
253 this.keys.metaKey[index] = false;
254 }
250 } else if (metaKeyName == 'Cmd' || metaKeyName == 'Win') { 255 } else if (metaKeyName == 'Cmd' || metaKeyName == 'Win') {
251 this.keys.metaKey[index] = false; 256 this.keys.metaKey[index] = false;
252 } 257 }
253 } 258 }
254 }; 259 };
255 260
256 261
257 /** 262 /**
258 * Get the user-facing name for the meta key (keyCode = 91), which varies 263 * Get the user-facing name for the meta key (keyCode = 91), which varies
259 * depending on the platform. 264 * depending on the platform.
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 break; 623 break;
619 case 122: // F11 624 case 122: // F11
620 evt['keyCode'] = 189; // Hyphen. 625 evt['keyCode'] = 189; // Hyphen.
621 break; 626 break;
622 case 123: // F12 627 case 123: // F12
623 evt['keyCode'] = 187; // Equals. 628 evt['keyCode'] = 187; // Equals.
624 break; 629 break;
625 } 630 }
626 return evt; 631 return evt;
627 }; 632 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698