| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }; |
| OLD | NEW |