1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved.
2 // limitations under the License.
3 // See the License for the specific language governing permissions and
4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5 // distributed under the License is distributed on an "AS-IS" BASIS,
6 // Unless required by applicable law or agreed to in writing, software
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // You may obtain a copy of the License at
11 // you may not use this file except in compliance with the License.
12 // Licensed under the Apache License, Version 2.0 (the "License");
14 goog.provide('i18n.input.chrome.inputview.layouts.RowsOf101');
16 goog.require('i18n.input.chrome.inputview.layouts.util');
19 goog.scope(function() {
20 var layouts = i18n.input.chrome.inputview.layouts;
21 var util = layouts.util;
25 * Creates the top four rows for 101 keyboard.
27 * @return {!Array.<!Object>} The rows.
29 layouts.RowsOf101.create = function() {
35 var keySequenceOf13 = util.createKeySequence(baseKeySpec, 13);
36 var backspaceKey = util.createKey({
39 var row1 = util.createLinearLayout({
41 'children': [keySequenceOf13, backspaceKey]
45 var tabKey = util.createKey({
48 keySequenceOf13 = util.
49 createKeySequence(baseKeySpec, 13);
50 var row2 = util.createLinearLayout({
52 'children': [tabKey, keySequenceOf13]
56 var capslockKey = util.createKey({
59 var keySequenceOf11 = util.
60 createKeySequence(baseKeySpec, 11);
61 var enterKey = util.createKey({
64 var row3 = util.createLinearLayout({
66 'children': [capslockKey, keySequenceOf11, enterKey]
70 var shiftLeftKey = util.createKey({
73 var keySequenceOf10 = util.
74 createKeySequence(baseKeySpec, 10);
75 var shiftRightKey = util.createKey({
78 var row4 = util.createLinearLayout({
80 'children': [shiftLeftKey, keySequenceOf10, shiftRightKey]
83 return [row1, row2, row3, row4];