Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / third_party / google_input_tools / src / chrome / os / inputview / config / compact_symbol_characters.js
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
7 //
8 //      http://www.apache.org/licenses/LICENSE-2.0
9 //
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");
13 //
14 goog.provide('i18n.input.chrome.inputview.content.compact.symbol');
15
16 goog.require('i18n.input.chrome.inputview.content.constants');
17
18 goog.scope(function() {
19 var NonLetterKeys = i18n.input.chrome.inputview.content.constants.NonLetterKeys;
20
21
22 /**
23  * Gets North American Symbol keyset characters.
24  *
25  * @return {!Array.<!Object>}
26  */
27 i18n.input.chrome.inputview.content.compact.symbol.keyNASymbolCharacters =
28     function() {
29   return [
30     /* 0 */ { 'text': '1',
31       'moreKeys': ['\u00B9', '\u00BD', '\u2153', '\u00BC', '\u215B']},
32     /* 1 */ { 'text': '2',
33       'moreKeys': ['\u00B2', '\u2154']},
34     /* 2 */ { 'text': '3',
35       'moreKeys': ['\u00B3', '\u00BE', '\u215C']},
36     /* 3 */ { 'text': '4',
37       'moreKeys': ['\u2074']},
38     /* 4 */ { 'text': '5',
39       'moreKeys': ['\u215D']},
40     /* 5 */ { 'text': '6' },
41     /* 6 */ { 'text': '7',
42       'moreKeys': ['\u215E']},
43     /* 7 */ { 'text': '8' },
44     /* 8 */ { 'text': '9' },
45     /* 9 */ { 'text': '0',
46       'moreKeys': ['\u207F', '\u2205']},
47     /* 10 */ NonLetterKeys.BACKSPACE,
48     /* 11 */ { 'text': '@', 'marginLeftPercent': 0.33 },
49     /* 12 */ { 'text': '#' },
50     /* 13 */ { 'text': '$',
51       'moreKeys': ['\u00A2', '\u00A3', '\u20AC', '\u00A5', '\u20B1']},
52     /* 14 */ { 'text': '%',
53       'moreKeys': ['\u2030']},
54     /* 15 */ { 'text': '&' },
55     // Keep in sync with rowkeys_symbols2.xml in android input tool.
56     /* 16 */ { 'text': '-',
57       'moreKeys': ['_', '\u2013', '\u2014', '\u00B7']},
58     /* 17 */ { 'text': '+',
59       'moreKeys': ['\u00B1']},
60     /* 18 */ { 'text': '(',
61       'moreKeys': ['\u007B', '\u003C', '\u005B']},
62     /* 19 */ { 'text': ')',
63       'moreKeys': ['\u007D', '\u003E', '\u005D']},
64     /* 20 */ NonLetterKeys.ENTER,
65     /* 21 */ NonLetterKeys.SWITCHER,
66     /* 22 */ { 'text': '\\' },
67     /* 23 */ { 'text': '=' },
68     /* 24 */ { 'text': '*',
69       'moreKeys': ['\u2020', '\u2021', '\u2605']},
70     // keep in sync with double_lqm_rqm and double_laqm_raqm in android input
71     // tool.
72     /* 25 */ { 'text': '"',
73       'moreKeys': ['\u201C', '\u201E', '\u201D', '\u00AB', '\u00BB']},
74     // keep in sync with single_lqm_rqm and single_laqm_raqm in android input
75     // tool
76     /* 26 */ { 'text': '\'',
77       'moreKeys': ['\u2018', '\u201A', '\u2019', '\u2039', '\u203A']},
78     /* 27 */ { 'text': ':' },
79     /* 28 */ { 'text': ';' },
80     /* 29 */ { 'text': '!',
81       'moreKeys': ['\u00A1']},
82     /* 30 */ { 'text': '?',
83       'moreKeys': ['\u00BF']},
84     /* 31 */ NonLetterKeys.SWITCHER,
85     /* 32 */ NonLetterKeys.SWITCHER,
86     /* 33 */ { 'text': '_', 'isGrey': true },
87     /* 34 */ NonLetterKeys.MENU,
88     /* 35 */ { 'text': '/', 'isGrey': true },
89     /* 36 */ NonLetterKeys.SPACE,
90     /* 37 */ { 'text': ',', 'isGrey': true },
91     /* 38 */ { 'text': '.', 'isGrey': true,
92       'moreKeys': ['\u2026']},
93     /* 39 */ NonLetterKeys.HIDE
94   ];
95 };
96
97
98 /**
99  * Gets United Kingdom Symbol keyset characters.
100  *
101  * @return {!Array.<!Object>}
102  */
103 i18n.input.chrome.inputview.content.compact.symbol.keyUKSymbolCharacters =
104     function() {
105   // Copy North America symbol characters.
106   var data = i18n.input.chrome.inputview.content.compact.symbol.
107       keyNASymbolCharacters();
108   // UK uses pound sign instead of dollar sign.
109   data[13] = { 'text': '\u00A3',
110                'moreKeys': ['\u00A2', '$', '\u20AC', '\u00A5', '\u20B1']};
111   return data;
112 };
113
114
115 /**
116  * Gets European Symbol keyset characters.
117  *
118  * @return {!Array.<!Object>}
119  */
120 i18n.input.chrome.inputview.content.compact.symbol.keyEUSymbolCharacters =
121     function() {
122   // Copy UK symbol characters.
123   var data = i18n.input.chrome.inputview.content.compact.symbol.
124       keyUKSymbolCharacters();
125   // European uses euro sign instead of pound sign.
126   data[13] = { 'text': '\u20AC',
127                'moreKeys': ['\u00A2', '$', '\u00A3', '\u00A5', '\u20B1']};
128   return data;
129 };
130
131
132 /**
133  * Gets Pinyin Symbol keyset characters.
134  *
135  * @return {!Array.<!Object>}
136  */
137 i18n.input.chrome.inputview.content.compact.symbol.keyPinyinSymbolCharacters =
138     function() {
139   var data = i18n.input.chrome.inputview.content.compact.symbol.
140       keyNASymbolCharacters();
141   data[13]['text'] = '\u00A5';
142   data[13]['moreKeys'] = ['\u0024', '\u00A2', '\u00A3', '\u20AC', '\u20B1'];
143   data[15]['text'] = '&';
144   data[18]['text'] = '\uff08';
145   data[18]['moreKeys'] = ['\uff5b', '\u300a', '\uff3b', '\u3010'];
146   data[19]['text'] = '\uff09';
147   data[19]['moreKeys'] = ['\uff5d', '\u300b', '\uff3d', '\u3001'];
148   data[22]['text'] = '\u3001';
149   data[25]['text'] = '\u201C';
150   data[25]['moreKeys'] = ['\u0022', '\u00AB'];
151   data[26]['text'] = '\u201D';
152   data[26]['moreKeys'] = ['\u0022', '\u00BB'];
153   data[27]['text'] = '\uff1a';
154   data[28]['text'] = '\uff1b';
155   data[29]['text'] = '\u2018';
156   data[29]['moreKeys'] = ['\u0027', '\u2039'];
157   data[30]['text'] = '\u2019';
158   data[30]['moreKeys'] = ['\u0027', '\u203a'];
159   data[33]['text'] = ' \u2014';
160   data[33]['moreKeys'] = undefined;
161   data[35]['text'] = '\u2026';
162   data[35]['moreKeys'] = undefined;
163   data[37]['text'] = '\uff0c';
164   data[38]['text'] = '\u3002';
165   return data;
166 };
167 });  // goog.scope