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

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

Issue 540583002: Fix the ChromeVox "sticky key" (pressing Search twice). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 case 'ctrlKey': 380 case 'ctrlKey':
381 return (keyEvent.ctrlKey || keyEvent.keyCode == 17); 381 return (keyEvent.ctrlKey || keyEvent.keyCode == 17);
382 break; 382 break;
383 case 'altKey': 383 case 'altKey':
384 return (keyEvent.altKey || (keyEvent.keyCode == 18)); 384 return (keyEvent.altKey || (keyEvent.keyCode == 18));
385 break; 385 break;
386 case 'shiftKey': 386 case 'shiftKey':
387 return (keyEvent.shiftKey || (keyEvent.keyCode == 16)); 387 return (keyEvent.shiftKey || (keyEvent.keyCode == 16));
388 break; 388 break;
389 case 'metaKey': 389 case 'metaKey':
390 return (keyEvent.metaKey || 390 return (!cvox.ChromeVox.isChromeOS &&
David Tseng 2014/09/04 15:33:33 This line of fixes worries me and seems to say tha
391 (!cvox.ChromeVox.isChromeOS && keyEvent.keyCode == 91)); 391 (keyEvent.metaKey || keyEvent.keyCode == 91));
392 break; 392 break;
393 case 'searchKeyHeld': 393 case 'searchKeyHeld':
394 return ((cvox.ChromeVox.isChromeOS && keyEvent.keyCode == 91) || 394 return ((cvox.ChromeVox.isChromeOS && keyEvent.keyCode == 91) ||
395 keyEvent['searchKeyHeld']); 395 keyEvent['searchKeyHeld']);
396 break; 396 break;
397 } 397 }
398 return false; 398 return false;
399 }; 399 };
400 400
401 /** 401 /**
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 break; 621 break;
622 case 122: // F11 622 case 122: // F11
623 evt['keyCode'] = 189; // Hyphen. 623 evt['keyCode'] = 189; // Hyphen.
624 break; 624 break;
625 case 123: // F12 625 case 123: // F12
626 evt['keyCode'] = 187; // Equals. 626 evt['keyCode'] = 187; // Equals.
627 break; 627 break;
628 } 628 }
629 return evt; 629 return evt;
630 }; 630 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698