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');
20 * Creates the top four rows for 101 keyboard.
22 * @return {!Array.<!Object>} The rows.
24 i18n.input.chrome.inputview.layouts.RowsOf101.create = function() {
31 var backquoteKey = i18n.input.chrome.inputview.layouts.util.createKey({
34 var keySequenceOf12 = i18n.input.chrome.inputview.layouts.util.
35 createKeySequence(baseKeySpec, 12);
36 var backspaceKey = i18n.input.chrome.inputview.layouts.util.createKey({
39 var row1 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({
41 'children': [backquoteKey, keySequenceOf12, backspaceKey]
45 var tabKey = i18n.input.chrome.inputview.layouts.util.createKey({
48 keySequenceOf12 = i18n.input.chrome.inputview.layouts.util.
49 createKeySequence(baseKeySpec, 12);
50 var backSlashKey = i18n.input.chrome.inputview.layouts.util.createKey({
53 var row2 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({
55 'children': [tabKey, keySequenceOf12, backSlashKey]
59 var capslockKey = i18n.input.chrome.inputview.layouts.util.createKey({
62 var keySequenceOf11 = i18n.input.chrome.inputview.layouts.util.
63 createKeySequence(baseKeySpec, 11);
64 var enterKey = i18n.input.chrome.inputview.layouts.util.createKey({
67 var row3 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({
69 'children': [capslockKey, keySequenceOf11, enterKey]
73 var shiftLeftKey = i18n.input.chrome.inputview.layouts.util.createKey({
76 var keySequenceOf9 = i18n.input.chrome.inputview.layouts.util.
77 createKeySequence(baseKeySpec, 9);
78 var slashKey = i18n.input.chrome.inputview.layouts.util.createKey({
81 var shiftRightKey = i18n.input.chrome.inputview.layouts.util.createKey({
84 var row4 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({
86 'children': [shiftLeftKey, keySequenceOf9, slashKey, shiftRightKey]
89 return [row1, row2, row3, row4];