1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
|
// Copyright 2014 The ChromeOS IME Authors. All Rights Reserved.
// limitations under the License.
// See the License for the specific language governing permissions and
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// distributed under the License is distributed on an "AS-IS" BASIS,
// Unless required by applicable law or agreed to in writing, software
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// You may obtain a copy of the License at
// you may not use this file except in compliance with the License.
// Licensed under the Apache License, Version 2.0 (the "License");
//
goog.require('i18n.input.chrome.inputview.content.ContextlayoutUtil');
goog.require('i18n.input.chrome.inputview.content.compact.letter');
goog.require('i18n.input.chrome.inputview.content.compact.more');
goog.require('i18n.input.chrome.inputview.content.compact.numberpad');
goog.require('i18n.input.chrome.inputview.content.compact.symbol');
goog.require('i18n.input.chrome.inputview.content.compact.util');
goog.require('i18n.input.chrome.inputview.content.util');
goog.require('i18n.input.chrome.message.ContextType');
(function() {
var ContextType = i18n.input.chrome.message.ContextType;
var viewIdPrefix_ = '102kbd-k-';
var keyCharacters = [
['\u00a7', '\u00bd', '\u00b6', '\u00be'], // TLDE
['\u0031', '\u0021', '\u00a1', '\u00b9'], // AE01
['\u0032', '\u0022', '\u0040', '\u00b2'], // AE02
['\u0033', '\u0023', '\u00a3', '\u00b3'], // AE03
['\u0034', '\u00a4', '\u0024', '\u00bc'], // AE04
['\u0035', '\u0025', '\u20ac', '\u00a2'], // AE05
['\u0036', '\u0026', '\u00a5', '\u215d'], // AE06
['\u0037', '\u002f', '\u007b', '\u00f7'], // AE07
['\u0038', '\u0028', '\u005b', '\u00ab'], // AE08
['\u0039', '\u0029', '\u005d', '\u00bb'], // AE09
['\u0030', '\u003d', '\u007d', '\u00b0'], // AE10
['\u002b', '\u003f', '\u005c', '\u00bf'], // AE11
['\u0301', '\u0300', '\u00b1', '\u00ac'], // AE12
['\u0071', '\u0051', '\u0040', '\u03a9'], // AD01
['\u0077', '\u0057', '\u0142', '\u0141'], // AD02
['\u0065', '\u0045', '\u20ac', '\u00a2'], // AD03
['\u0072', '\u0052', '\u00ae', '\u00ae'], // AD04
['\u0074', '\u0054', '\u00fe', '\u00de'], // AD05
['\u0079', '\u0059', '\u2190', '\u00a5'], // AD06
['\u0075', '\u0055', '\u2193', '\u2191'], // AD07
['\u0069', '\u0049', '\u2192', '\u0131'], // AD08
['\u006f', '\u004f', '\u0153', '\u0152'], // AD09
['\u0070', '\u0050', '\u00fe', '\u00de'], // AD10
['\u00e5', '\u00c5', '\u0308', '\u030a'], // AD11
['\u0308', '\u0302', '\u0303', '\u030c'], // AD12
['\u0061', '\u0041', '\u00aa', '\u00ba'], // AC01
['\u0073', '\u0053', '\u00df', '\u00a7'], // AC02
['\u0064', '\u0044', '\u00f0', '\u00d0'], // AC03
['\u0066', '\u0046', '\u0111', '\u00aa'], // AC04
['\u0067', '\u0047', '\u014b', '\u014a'], // AC05
['\u0068', '\u0048', '\u0127', '\u0126'], // AC06
['\u006a', '\u004a', '\u0309', '\u031b'], // AC07
['\u006b', '\u004b', '\u0138', '\u0026'], // AC08
['\u006c', '\u004c', '\u0142', '\u0141'], // AC09
['\u00f6', '\u00d6', '\u00f8', '\u00d8'], // AC10
['\u00e4', '\u00c4', '\u00e6', '\u00c6'], // AC11
['\u0027', '\u002a', '\u00b4', '\u00d7'], // BKSL
['\u003c', '\u003e', '\u007c', '\u00a6'], // LSGT
['\u007a', '\u005a', '\u00ab', '\u003c'], // AB01
['\u0078', '\u0058', '\u00bb', '\u003e'], // AB02
['\u0063', '\u0043', '\u00a9', '\u00a9'], // AB03
['\u0076', '\u0056', '\u201c', '\u2018'], // AB04
['\u0062', '\u0042', '\u201d', '\u2019'], // AB05
['\u006e', '\u004e'], // AB06
['\u006d', '\u004d', '\u00b5', '\u00ba'], // AB07
['\u002c', '\u003b', '\u0327', '\u0328'], // AB08
['\u002e', '\u003a', '\u00b7', '\u0307'], // AB09
['\u002d', '\u005f', '\u0323', '\u0307'], // AB10
['\u0020', '\u0020', '\u0020', '\u00a0'] // SPCE
];
var keyCodes = [
0xDC, // TLDE
0x31, // AE01
0x32, // AE02
0x33, // AE03
0x34, // AE04
0x35, // AE05
0x36, // AE06
0x37, // AE07
0x38, // AE08
0x39, // AE09
0x30, // AE10
0xBB, // AE11
0xDB, // AE12
0x51, // AD01
0x57, // AD02
0x45, // AD03
0x52, // AD04
0x54, // AD05
0x59, // AD06
0x55, // AD07
0x49, // AD08
0x4F, // AD09
0x50, // AD10
0xDD, // AD11
0xBA, // AD12
0x41, // AC01
0x53, // AC02
0x44, // AC03
0x46, // AC04
0x47, // AC05
0x48, // AC06
0x4A, // AC07
0x4B, // AC08
0x4C, // AC09
0xC0, // AC10
0xDE, // AC11
0xBF, // BKSL
0xE2, // LTGT
0x5A, // AB01
0x58, // AB02
0x43, // AB03
0x56, // AB04
0x42, // AB05
0x4E, // AB06
0x4D, // AB07
0xBC, // AB08
0xBE, // AB09
0xBD, // AB10
0x20 // SPCE
];
var data = i18n.input.chrome.inputview.content.util.createData(
keyCharacters, viewIdPrefix_, true, true, keyCodes, 'se.compact.qwerty');
data['id'] = 'se';
google.ime.chrome.inputview.onConfigLoaded(data);
var keysetSpecNode =
i18n.input.chrome.inputview.content.compact.util.CompactKeysetSpec;
var letterKeysetSpec = {};
letterKeysetSpec[keysetSpecNode.ID] = 'se.compact.qwerty';
letterKeysetSpec[keysetSpecNode.LAYOUT] = 'compactkbd-nordic';
letterKeysetSpec[keysetSpecNode.DATA] =
i18n.input.chrome.inputview.content.compact.letter.keySwedenCharacters();
var symbolKeysetSpec = {};
symbolKeysetSpec[keysetSpecNode.ID] = 'se.compact.symbol';
symbolKeysetSpec[keysetSpecNode.LAYOUT] = 'compactkbd-qwerty';
symbolKeysetSpec[keysetSpecNode.DATA] = i18n.input.chrome.inputview.content.
compact.symbol.keyEUSymbolCharacters();
var moreKeysetSpec = {};
moreKeysetSpec[keysetSpecNode.ID] = 'se.compact.more';
moreKeysetSpec[keysetSpecNode.LAYOUT] = 'compactkbd-qwerty';
moreKeysetSpec[keysetSpecNode.DATA] =
i18n.input.chrome.inputview.content.compact.more.keyEUMoreCharacters();
i18n.input.chrome.inputview.content.compact.util.generateCompactKeyboard(
letterKeysetSpec, symbolKeysetSpec, moreKeysetSpec,
google.ime.chrome.inputview.onConfigLoaded);
var inputTypeToKeysetSpecMap = {};
var numberKeysetSpec = {};
numberKeysetSpec[keysetSpecNode.ID] = 'se.compact.numberpad';
numberKeysetSpec[keysetSpecNode.LAYOUT] = 'compactkbd-numberpad';
numberKeysetSpec[keysetSpecNode.DATA] = i18n.input.chrome.inputview.content.
compact.numberpad.keyNumberpadCharacters();
inputTypeToKeysetSpecMap[ContextType.NUMBER] = numberKeysetSpec;
var phoneKeysetSpec = {};
phoneKeysetSpec[keysetSpecNode.ID] = 'se.compact.phonepad';
phoneKeysetSpec[keysetSpecNode.LAYOUT] = 'compactkbd-numberpad';
phoneKeysetSpec[keysetSpecNode.DATA] = i18n.input.chrome.inputview.content.
compact.numberpad.keyPhonepadCharacters();
inputTypeToKeysetSpecMap[ContextType.PHONE] = phoneKeysetSpec;
i18n.input.chrome.inputview.content.ContextlayoutUtil.generateContextLayouts(
inputTypeToKeysetSpecMap, google.ime.chrome.inputview.onConfigLoaded);
}) ();
|