OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 /** |
| 6 * @fileoverview A simple English virtual keyboard implementation. |
| 7 */ |
| 8 |
| 9 /** |
| 10 * All keys for the rows of the keyboard. |
| 11 * NOTE: every row below should have an aspect of 12.6. |
| 12 * @type {Array.<Array.<BaseKey>>} |
| 13 */ |
| 14 var KEYS_US = [ |
| 15 [ |
| 16 new Key(C('\`'), C('~')), |
| 17 new Key(C('1'), C('!')), |
| 18 new Key(C('2'), C('@')), |
| 19 new Key(C('3'), C('#')), |
| 20 new Key(C('4'), C('$')), |
| 21 new Key(C('5'), C('%')), |
| 22 new Key(C('6'), C('^')), |
| 23 new Key(C('7'), C('&')), |
| 24 new Key(C('8'), C('*')), |
| 25 new Key(C('9'), C('(')), |
| 26 new Key(C('0'), C(')')), |
| 27 new Key(C('-'), C('_')), |
| 28 new Key(C('='), C('+')), |
| 29 new SvgKey('backspace', 'Backspace', true /* repeat */) |
| 30 ], |
| 31 [ |
| 32 new SvgKey('tab', 'Tab'), |
| 33 new Key(C('q'), C('Q')), |
| 34 new Key(C('w'), C('W')), |
| 35 new Key(C('e'), C('E')), |
| 36 new Key(C('r'), C('R')), |
| 37 new Key(C('t'), C('T')), |
| 38 new Key(C('y'), C('Y')), |
| 39 new Key(C('u'), C('U')), |
| 40 new Key(C('i'), C('I')), |
| 41 new Key(C('o'), C('O')), |
| 42 new Key(C('p'), C('P')), |
| 43 new Key(C('['), C('{')), |
| 44 new Key(C(']'), C('}')), |
| 45 new Key(C('\\'), C('|'), 'bar'), |
| 46 ], |
| 47 [ |
| 48 new SymbolKey(), |
| 49 new Key(C('a'), C('A')), |
| 50 new Key(C('s'), C('S')), |
| 51 new Key(C('d'), C('D')), |
| 52 new Key(C('f'), C('F')), |
| 53 new Key(C('g'), C('G')), |
| 54 new Key(C('h'), C('H')), |
| 55 new Key(C('j'), C('J')), |
| 56 new Key(C('k'), C('K')), |
| 57 new Key(C('l'), C('L')), |
| 58 new Key(C(';'), C(':')), |
| 59 new Key(C('\''), C('"')), |
| 60 new SvgKey('return', 'Enter') |
| 61 ], |
| 62 [ |
| 63 new ShiftKey('left-shift'), |
| 64 new Key(C('z'), C('Z')), |
| 65 new Key(C('x'), C('X')), |
| 66 new Key(C('c'), C('C')), |
| 67 new Key(C('v'), C('V')), |
| 68 new Key(C('b'), C('B')), |
| 69 new Key(C('n'), C('N')), |
| 70 new Key(C('m'), C('M')), |
| 71 new Key(C(','), C('<')), |
| 72 new Key(C('.'), C('>')), |
| 73 new Key(C('/'), C('?')), |
| 74 new ShiftKey('right-shift') |
| 75 ], |
| 76 [ |
| 77 new DotComKey(), |
| 78 new SpecialKey('at', '@', '@'), |
| 79 new SpecialKey('space', ' ', 'Spacebar'), |
| 80 new SpecialKey('comma', ',', ','), |
| 81 new SpecialKey('period', '.', '.') |
| 82 ] |
| 83 ]; |
| 84 |
| 85 // Add layout to KEYBOARDS, which is defined in common.js |
| 86 KEYBOARDS['us'] = { |
| 87 'definition': KEYS_US, |
| 88 'aspect': 3.15, |
| 89 }; |
OLD | NEW |