| 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 SvgKey('tab', 'Tab'), | |
| 17 new Key(CP('q'), CP('Q'), CP('1'), CP('`')), | |
| 18 new Key(CP('w'), CP('W'), CP('2'), CP('~')), | |
| 19 new Key(CP('e'), CP('E'), CP('3'), CP('<', 'LessThan')), | |
| 20 new Key(CP('r'), CP('R'), CP('4'), CP('>', 'GreaterThan')), | |
| 21 new Key(CP('t'), CP('T'), CP('5'), CP('[')), | |
| 22 new Key(CP('y'), CP('Y'), CP('6'), CP(']')), | |
| 23 new Key(CP('u'), CP('U'), CP('7'), CP('{')), | |
| 24 new Key(CP('i'), CP('I'), CP('8'), CP('}')), | |
| 25 new Key(CP('o'), CP('O'), CP('9'), CP('\'')), | |
| 26 new Key(CP('p'), CP('P'), CP('0'), CP('|')), | |
| 27 new SvgKey('backspace', 'Backspace', true /* repeat */) | |
| 28 ], | |
| 29 [ | |
| 30 new SymbolKey(), | |
| 31 new Key(CP('a'), CP('A'), CP('!'), CP('+')), | |
| 32 new Key(CP('s'), CP('S'), CP('@'), CP('=')), | |
| 33 new Key(CP('d'), CP('D'), CP('#'), CP(' ')), | |
| 34 new Key(CP('f'), CP('F'), CP('$'), CP(' ')), | |
| 35 new Key(CP('g'), CP('G'), CP('%'), CP(' ')), | |
| 36 new Key(CP('h'), CP('H'), CP('^'), CP(' ')), | |
| 37 new Key(CP('j'), CP('J'), CP('&', 'Ampersand'), CP(' ')), | |
| 38 new Key(CP('k'), CP('K'), CP('*'), CP('#')), | |
| 39 new Key(CP('l'), CP('L'), CP('('), CP(' ')), | |
| 40 new Key(CP('\''), CP('\''), CP(')'), CP(' ')), | |
| 41 new SvgKey('return', 'Enter') | |
| 42 ], | |
| 43 [ | |
| 44 new ShiftKey('left_shift'), | |
| 45 new Key(CP('z'), CP('Z'), CP('/'), CP(' ')), | |
| 46 new Key(CP('x'), CP('X'), CP('-'), CP(' ')), | |
| 47 new Key(CP('c'), CP('C'), CP('\''), CP(' ')), | |
| 48 new Key(CP('v'), CP('V'), CP('"'), CP(' ')), | |
| 49 new Key(CP('b'), CP('B'), CP(':'), CP('.')), | |
| 50 new Key(CP('n'), CP('N'), CP(';'), CP(' ')), | |
| 51 new Key(CP('m'), CP('M'), CP('_'), CP(' ')), | |
| 52 new Key(CP('!'), CP('!'), CP('{'), CP(' ')), | |
| 53 new Key(CP('?'), CP('?'), CP('}'), CP(' ')), | |
| 54 new Key(CP('/'), CP('/'), CP('\\'), CP(' ')), | |
| 55 new ShiftKey() | |
| 56 ], | |
| 57 [ | |
| 58 new SvgKey('mic', ''), | |
| 59 new DotComKey(), | |
| 60 new SpecialKey('at', '@', '@'), | |
| 61 // TODO(bryeung): the spacebar needs to be a little bit more stretchy, | |
| 62 // since this row has only 7 keys (as opposed to 12), the truncation | |
| 63 // can cause it to not be wide enough. | |
| 64 new SpecialKey('space', ' ', 'Spacebar'), | |
| 65 new SpecialKey('comma', ',', ','), | |
| 66 new SpecialKey('period', '.', '.'), | |
| 67 new HideKeyboardKey() | |
| 68 ] | |
| 69 ]; | |
| 70 | |
| 71 // Add layout to KEYBOARDS, which is defined in common.js | |
| 72 KEYBOARDS['us'] = { | |
| 73 "definition": KEYS_US, | |
| 74 "aspect": 3.15, | |
| 75 } | |
| OLD | NEW |