| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 simple English virtual keyboard implementation. | 6 * @fileoverview A simple English virtual keyboard implementation. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * All keys for the rows of the keyboard. | 10 * All keys for the rows of the keyboard. |
| 11 * NOTE: every row below should have an aspect of 12.6. | 11 * NOTE: every row below should have an aspect of 12.6. |
| 12 * @type {Array.<Array.<BaseKey>>} | 12 * @type {Array.<Array.<BaseKey>>} |
| 13 */ | 13 */ |
| 14 var KEYS_US = [ | 14 var KEYS_US = [ |
| 15 [ | 15 [ |
| 16 new SvgKey('tab', 'Tab'), | 16 new SvgKey('tab', 'Tab'), |
| 17 new Key(C('q'), C('Q'), C('1'), C('`')), | 17 new Key(C('q'), C('Q'), C('1'), C('`')), |
| 18 new Key(C('w'), C('W'), C('2'), C('~')), | 18 new Key(C('w'), C('W'), C('2'), C('~')), |
| 19 new Key(C('e'), C('E'), C('3'), new Character('<', 'LessThan')), | 19 new Key(C('e'), C('E'), C('3'), C('<', 'LessThan')), |
| 20 new Key(C('r'), C('R'), C('4'), new Character('>', 'GreaterThan')), | 20 new Key(C('r'), C('R'), C('4'), C('>', 'GreaterThan')), |
| 21 new Key(C('t'), C('T'), C('5'), C('[')), | 21 new Key(C('t'), C('T'), C('5'), C('[')), |
| 22 new Key(C('y'), C('Y'), C('6'), C(']')), | 22 new Key(C('y'), C('Y'), C('6'), C(']')), |
| 23 new Key(C('u'), C('U'), C('7'), C('{')), | 23 new Key(C('u'), C('U'), C('7'), C('{')), |
| 24 new Key(C('i'), C('I'), C('8'), C('}')), | 24 new Key(C('i'), C('I'), C('8'), C('}')), |
| 25 new Key(C('o'), C('O'), C('9'), C('\'')), | 25 new Key(C('o'), C('O'), C('9'), C('\'')), |
| 26 new Key(C('p'), C('P'), C('0'), C('|')), | 26 new Key(C('p'), C('P'), C('0'), C('|')), |
| 27 new SvgKey('backspace', 'Backspace', true /* repeat */) | 27 new SvgKey('backspace', 'Backspace', true /* repeat */) |
| 28 ], | 28 ], |
| 29 [ | 29 [ |
| 30 new SymbolKey(), | 30 new SymbolKey(), |
| 31 new Key(C('a'), C('A'), C('!'), C('+')), | 31 new Key(C('a'), C('A'), C('!'), C('+')), |
| 32 new Key(C('s'), C('S'), C('@'), C('=')), | 32 new Key(C('s'), C('S'), C('@'), C('=')), |
| 33 new Key(C('d'), C('D'), C('#'), C(' ')), | 33 new Key(C('d'), C('D'), C('#'), C(' ')), |
| 34 new Key(C('f'), C('F'), C('$'), C(' ')), | 34 new Key(C('f'), C('F'), C('$'), C(' ')), |
| 35 new Key(C('g'), C('G'), C('%'), C(' ')), | 35 new Key(C('g'), C('G'), C('%'), C(' ')), |
| 36 new Key(C('h'), C('H'), C('^'), C(' ')), | 36 new Key(C('h'), C('H'), C('^'), C(' ')), |
| 37 new Key(C('j'), C('J'), new Character('&', 'Ampersand'), C(' ')), | 37 new Key(C('j'), C('J'), C('&', 'Ampersand'), C(' ')), |
| 38 new Key(C('k'), C('K'), C('*'), C('#')), | 38 new Key(C('k'), C('K'), C('*'), C('#')), |
| 39 new Key(C('l'), C('L'), C('('), C(' ')), | 39 new Key(C('l'), C('L'), C('('), C(' ')), |
| 40 new Key(C('\''), C('\''), C(')'), C(' ')), | 40 new Key(C('\''), C('\''), C(')'), C(' ')), |
| 41 new SvgKey('return', 'Enter') | 41 new SvgKey('return', 'Enter') |
| 42 ], | 42 ], |
| 43 [ | 43 [ |
| 44 new ShiftKey('left_shift'), | 44 new ShiftKey('left_shift'), |
| 45 new Key(C('z'), C('Z'), C('/'), C(' ')), | 45 new Key(C('z'), C('Z'), C('/'), C(' ')), |
| 46 new Key(C('x'), C('X'), C('-'), C(' ')), | 46 new Key(C('x'), C('X'), C('-'), C(' ')), |
| 47 new Key(C('c'), C('C'), C('\''), C(' ')), | 47 new Key(C('c'), C('C'), C('\''), C(' ')), |
| (...skipping 18 matching lines...) Expand all Loading... |
| 66 new SpecialKey('period', '.', '.'), | 66 new SpecialKey('period', '.', '.'), |
| 67 new HideKeyboardKey() | 67 new HideKeyboardKey() |
| 68 ] | 68 ] |
| 69 ]; | 69 ]; |
| 70 | 70 |
| 71 // Add layout to KEYBOARDS, which is defined in common.js | 71 // Add layout to KEYBOARDS, which is defined in common.js |
| 72 KEYBOARDS['us'] = { | 72 KEYBOARDS['us'] = { |
| 73 "definition": KEYS_US, | 73 "definition": KEYS_US, |
| 74 "aspect": 3.15, | 74 "aspect": 3.15, |
| 75 } | 75 } |
| OLD | NEW |