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

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

Issue 1982263005: Adjust key sequence string (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 collection of JavaScript utilities used to simplify working 6 * @fileoverview A collection of JavaScript utilities used to simplify working
7 * with keyboard events. 7 * with keyboard events.
8 */ 8 */
9 9
10 10
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 str += tempStr; 464 str += tempStr;
465 465
466 // Strip trailing +. 466 // Strip trailing +.
467 if (str[str.length - 1] == '+') { 467 if (str[str.length - 1] == '+') {
468 str = str.slice(0, -1); 468 str = str.slice(0, -1);
469 } 469 }
470 } 470 }
471 471
472 if (keySequence.cvoxModifier || keySequence.prefixKey) { 472 if (keySequence.cvoxModifier || keySequence.prefixKey) {
473 if (str != '') { 473 if (str != '') {
474 str = 'Cvox+' + str; 474 str = 'ChromeVox+' + str;
475 } else { 475 } else {
476 str = 'Cvox'; 476 str = 'Cvox';
477 } 477 }
478 } else if (keySequence.stickyMode) { 478 } else if (keySequence.stickyMode) {
479 if (str[str.length - 1] == '>') { 479 if (str[str.length - 1] == '>') {
480 str = str.slice(0, -1); 480 str = str.slice(0, -1);
481 } 481 }
482 str = str + '+' + str; 482 str = str + '+' + str;
483 } 483 }
484 return str; 484 return str;
(...skipping 10 matching lines...) Expand all
495 key.doubleTap = true; 495 key.doubleTap = true;
496 for (var i = 0, keySeq; keySeq = cvox.KeySequence.doubleTapCache[i]; i++) { 496 for (var i = 0, keySeq; keySeq = cvox.KeySequence.doubleTapCache[i]; i++) {
497 if (keySeq.equals(key)) { 497 if (keySeq.equals(key)) {
498 isSet = true; 498 isSet = true;
499 break; 499 break;
500 } 500 }
501 } 501 }
502 key.doubleTap = originalState; 502 key.doubleTap = originalState;
503 return isSet; 503 return isSet;
504 }; 504 };
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