1 // Copyright (c) 2012 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.
5 #include "base/basictypes.h"
6 #include "base/prefs/pref_registry_simple.h"
7 #include "chrome/browser/chromeos/language_preferences.h"
8 #include "chrome/common/pref_names.h"
9 #include "components/user_prefs/pref_registry_syncable.h"
10 #include "grit/generated_resources.h"
13 namespace language_prefs
{
15 // ---------------------------------------------------------------------------
17 // ---------------------------------------------------------------------------
18 const char kGeneralSectionName
[] = "general";
19 const char kPreloadEnginesConfigName
[] = "preload_engines";
21 // ---------------------------------------------------------------------------
22 // For Traditional Chinese input method (ibus-mozc-chewing)
23 // ---------------------------------------------------------------------------
24 const char kChewingSectionName
[] = "engine/Chewing";
26 // We have to sync the |ibus_config_name|s with those in
27 // ibus-chewing/files/src/Config.cc.
28 const LanguageBooleanPrefs kChewingBooleanPrefs
[] = {
29 { prefs::kLanguageChewingAutoShiftCur
, false, "autoShiftCur",
30 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_AUTO_SHIFT_CUR
,
31 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
32 { prefs::kLanguageChewingAddPhraseDirection
, false, "addPhraseDirection",
33 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_ADD_PHRASE_DIRECTION
,
34 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
35 /* Temporarily disabled. (crosbug.com/14185)
36 { prefs::kLanguageChewingEasySymbolInput, true, "easySymbolInput",
37 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_EASY_SYMBOL_INPUT,
38 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF },
40 { prefs::kLanguageChewingEscCleanAllBuf
, false, "escCleanAllBuf",
41 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_ESC_CLEAN_ALL_BUF
,
42 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
43 { prefs::kLanguageChewingForceLowercaseEnglish
, false,
44 "forceLowercaseEnglish",
45 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_FORCE_LOWER_CASE_ENGLISH
,
46 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
47 /* Temporarily disabled. (crosbug.com/14185)
48 { prefs::kLanguageChewingPlainZhuyin, false, "plainZhuyin",
49 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_PLAIN_ZHUYIN,
50 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF },
52 { prefs::kLanguageChewingPhraseChoiceRearward
, true, "phraseChoiceRearward",
53 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_PHRASE_CHOICE_REARWARD
,
54 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
55 { prefs::kLanguageChewingSpaceAsSelection
, true, "spaceAsSelection",
56 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_SPACE_AS_SELECTION
,
57 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
59 COMPILE_ASSERT(kNumChewingBooleanPrefs
== arraysize(kChewingBooleanPrefs
),
62 const LanguageIntegerRangePreference kChewingIntegerPrefs
[] = {
63 { prefs::kLanguageChewingMaxChiSymbolLen
, 20, 8, 40, "maxChiSymbolLen",
64 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_MAX_CHI_SYMBOL_LEN
,
65 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
67 { prefs::kLanguageChewingCandPerPage
, 10, 8, 10, "candPerPage",
68 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_CAND_PER_PAGE
,
69 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
72 COMPILE_ASSERT(kNumChewingIntegerPrefs
== arraysize(kChewingIntegerPrefs
),
75 const LanguageMultipleChoicePreference
<const char*>
76 kChewingMultipleChoicePrefs
[] = {
77 { prefs::kLanguageChewingKeyboardType
,
81 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DEFAULT
},
82 { "hsu", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_HSU
},
83 { "ibm", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_IBM
},
85 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_GIN_YIEH
},
86 { "eten", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_ETEN
},
87 { "eten26", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_ETEN26
},
88 { "dvorak", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DVORAK
},
90 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DVORAK_HSU
},
92 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DACHEN_26
},
93 { "hanyu", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_HANYU
}},
94 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE
,
95 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
,
97 { prefs::kLanguageChewingSelKeys
,
101 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_1234567890
},
103 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_ASDFGHJKLS
},
105 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_ASDFZXCV89
},
107 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_ASDFJKL789
},
109 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUSQJKIX
},
111 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUHTNSID
},
113 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUIDHTNS
},
115 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_1234QWERAS
}},
116 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS
,
117 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
,
120 COMPILE_ASSERT(kNumChewingMultipleChoicePrefs
==
121 arraysize(kChewingMultipleChoicePrefs
),
124 const LanguageMultipleChoicePreference
<int> kChewingHsuSelKeyType
= {
125 prefs::kLanguageChewingHsuSelKeyType
,
128 {{ 1, IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE_1
},
129 { 2, IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE_2
}},
130 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE
,
131 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
,
134 // ---------------------------------------------------------------------------
135 // For Korean input method (ibus-mozc-hangul)
136 // ---------------------------------------------------------------------------
137 const char kHangulSectionName
[] = "engine/Hangul";
138 const char kHangulKeyboardConfigName
[] = "HangulKeyboard";
140 const char kHangulHanjaBindingKeysConfigName
[] = "HanjaKeyBindings";
141 // Mozc-hangul treats Hangul_Hanja key as hanja key event even if it is not set.
142 // We add Control+9 since F9 key is reserved by the window manager.
143 // TODO(nona): Hanja keys are not configurable yet (and we're not sure if it
145 const char kHangulHanjaBindingKeys
[] = "F9,Ctrl 9";
147 const HangulKeyboardNameIDPair kHangulKeyboardNameIDPairs
[] = {
148 // We have to sync the |keyboard_id|s with those in libhangul.
149 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_2_SET
, "2" },
150 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_3_SET_FINAL
,
152 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_3_SET_390
, "39" },
153 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_3_SET_NO_SHIFT
,
155 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_ROMAJA
, "ro" },
156 // We don't support "Sebeolsik 2 set" keyboard.
158 COMPILE_ASSERT(kNumHangulKeyboardNameIDPairs
==
159 arraysize(kHangulKeyboardNameIDPairs
),
162 // ---------------------------------------------------------------------------
163 // For Simplified Chinese input method (ibus-mozc-pinyin)
164 // ---------------------------------------------------------------------------
165 const char kPinyinSectionName
[] = "engine/Pinyin";
167 // We have to sync the |ibus_config_name|s with those in
168 // ibus-mozc-pinyin/files/languages/pinyin/unix/ibus/config_updater.cc.
169 const LanguageBooleanPrefs kPinyinBooleanPrefs
[] = {
170 { prefs::kLanguagePinyinCorrectPinyin
, true, "CorrectPinyin",
171 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_CORRECT_PINYIN
,
172 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
173 { prefs::kLanguagePinyinFuzzyPinyin
, false, "FuzzyPinyin",
174 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_FUZZY_PINYIN
,
175 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
176 { prefs::kLanguagePinyinShiftSelectCandidate
, false, "ShiftSelectCandidate",
177 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_SHIFT_SELECT_PINYIN
,
178 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
179 { prefs::kLanguagePinyinMinusEqualPage
, true, "MinusEqualPage",
180 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_MINUS_EQUAL_PAGE
,
181 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
182 { prefs::kLanguagePinyinCommaPeriodPage
, true, "CommaPeriodPage",
183 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_COMMA_PERIOD_PAGE
,
184 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
185 { prefs::kLanguagePinyinAutoCommit
, false, "AutoCommit",
186 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_AUTO_COMMIT
,
187 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
188 { prefs::kLanguagePinyinDoublePinyin
, false, "DoublePinyin",
189 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_DOUBLE_PINYIN
,
190 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
191 { prefs::kLanguagePinyinInitChinese
, true, "InitChinese",
192 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_CHINESE
,
193 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
194 { prefs::kLanguagePinyinInitFull
, false, "InitFull",
195 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_FULL
,
196 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
197 { prefs::kLanguagePinyinInitFullPunct
, true, "InitFullPunct",
198 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_FULL_PUNCT
,
199 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
200 { prefs::kLanguagePinyinInitSimplifiedChinese
, true, "InitSimplifiedChinese",
201 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_SIMPLIFIED_CHINESE
,
202 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
203 // TODO(yusukes): Support PINYIN_{INCOMPLETE,CORRECT,FUZZY}_... prefs (32
204 // additional boolean prefs.)
206 COMPILE_ASSERT(kNumPinyinBooleanPrefs
== arraysize(kPinyinBooleanPrefs
),
208 // TODO(yusukes): Support HalfWidthPuncts and IncompletePinyin prefs if needed.
210 const LanguageMultipleChoicePreference
<int> kPinyinDoublePinyinSchema
= {
211 prefs::kLanguagePinyinDoublePinyinSchema
,
213 "DoublePinyinSchema",
214 {{ 0, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_MSPY
},
215 { 1, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_ZRM
},
216 { 2, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_ABC
},
217 { 3, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_ZGPY
},
218 { 4, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_PYJJ
}},
219 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA
,
220 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
,
223 const PinyinIntegerPref kPinyinIntegerPrefs
[] = {
224 // TODO(yusukes): the type of lookup_table_page_size on ibus should be uint.
225 { prefs::kLanguagePinyinLookupTablePageSize
,
227 "LookupTablePageSize",
229 // don't sync as it's not user configurable.
230 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF
}
232 COMPILE_ASSERT(kNumPinyinIntegerPrefs
== arraysize(kPinyinIntegerPrefs
),
235 // ---------------------------------------------------------------------------
236 // For Japanese input method (ibus-mozc)
237 // ---------------------------------------------------------------------------
238 const char kMozcSectionName
[] = "engine/Mozc";
240 const LanguageBooleanPrefs kMozcBooleanPrefs
[] = {
241 { prefs::kLanguageMozcIncognitoMode
,
244 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_INCOGNITO_MODE
,
245 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
246 { prefs::kLanguageMozcUseAutoImeTurnOff
,
248 "use_auto_ime_turn_off",
249 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_USE_AUTO_IME_TURN_OFF
,
250 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
251 { prefs::kLanguageMozcUseHistorySuggest
,
253 "use_history_suggest",
254 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_USE_HISTORY_SUGGEST
,
255 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
256 { prefs::kLanguageMozcUseDictionarySuggest
,
258 "use_dictionary_suggest",
259 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_USE_DICTIONARY_SUGGEST
,
260 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
},
262 COMPILE_ASSERT(kNumMozcBooleanPrefs
== arraysize(kMozcBooleanPrefs
),
265 extern const LanguageMultipleChoicePreference
<const char*>
266 kMozcMultipleChoicePrefs
[] = {
267 { prefs::kLanguageMozcPreeditMethod
,
270 {{ "ROMAN", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PREEDIT_METHOD_ROMAN
},
271 { "KANA", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PREEDIT_METHOD_KANA
}},
272 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PREEDIT_METHOD
,
273 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
,
275 { prefs::kLanguageMozcSessionKeymap
,
278 {{ "ATOK", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SESSION_KEYMAP_ATOK
},
279 { "MSIME", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SESSION_KEYMAP_MSIME
},
280 { "KOTOERI", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SESSION_KEYMAP_KOTOERI
}},
281 // TODO: Support "CUSTOM" keymap.
282 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SESSION_KEYMAP
,
283 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
,
285 { prefs::kLanguageMozcPunctuationMethod
,
287 "punctuation_method",
289 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD_KUTEN_TOUTEN
},
291 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD_COMMA_PERIOD
},
293 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD_KUTEN_PERIOD
},
295 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD_COMMA_TOUTEN
}},
296 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD
,
297 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
,
299 { prefs::kLanguageMozcSymbolMethod
,
300 "CORNER_BRACKET_MIDDLE_DOT",
302 {{ "CORNER_BRACKET_MIDDLE_DOT",
303 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD_CORNER_BRACKET_MIDDLE_DOT
},
304 { "SQUARE_BRACKET_SLASH",
305 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD_SQUARE_BRACKET_SLASH
},
306 { "CORNER_BRACKET_SLASH",
307 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD_CORNER_BRACKET_SLASH
},
308 { "SQUARE_BRACKET_MIDDLE_DOT",
309 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD_SQUARE_BRACKET_MIDDLE_DOT
}},
310 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD
,
311 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
,
313 { prefs::kLanguageMozcSpaceCharacterForm
,
314 "FUNDAMENTAL_INPUT_MODE",
315 "space_character_form",
316 {{ "FUNDAMENTAL_INPUT_MODE",
317 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SPACE_CHARACTER_FORM_FUNDAMENTAL_INPUT_MODE
},
318 { "FUNDAMENTAL_FULL_WIDTH",
319 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SPACE_CHARACTER_FORM_FUNDAMENTAL_FULL_WIDTH
},
320 { "FUNDAMENTAL_HALF_WIDTH",
321 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SPACE_CHARACTER_FORM_FUNDAMENTAL_HALF_WIDTH
}},
322 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SPACE_CHARACTER_FORM
,
323 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
,
325 { prefs::kLanguageMozcHistoryLearningLevel
,
327 "history_learning_level",
328 {{ "DEFAULT_HISTORY",
329 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_HISTORY_LEARNING_LEVEL_DEFAULT_HISTORY
},
331 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_HISTORY_LEARNING_LEVEL_READ_ONLY
},
333 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_HISTORY_LEARNING_LEVEL_NO_HISTORY
}},
334 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_HISTORY_LEARNING_LEVEL
,
335 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
,
337 // TODO(mazda): Uncomment this block once the candidate window in Chrome OS
338 // supports changing shortcut labels.
339 // { prefs::kLanguageMozcSelectionShortcut,
340 // "SHORTCUT_123456789",
341 // "selection_shortcut",
343 // IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SELECTION_SHORTCUT_NO_SHORTCUT },
344 // { "SHORTCUT_123456789",
345 // IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SELECTION_SHORTCUT_SHORTCUT_123456789 },
346 // { "SHORTCUT_ASDFGHJKL",
347 // IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SELECTION_SHORTCUT_SHORTCUT_ASDFGHJKL }},
348 // IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SELECTION_SHORTCUT,
349 // user_prefs::PrefRegistrySyncable::SYNCABLE_PREF,
351 { prefs::kLanguageMozcShiftKeyModeSwitch
,
353 "shift_key_mode_switch",
355 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SHIFT_KEY_MODE_SWITCH_OFF
},
356 { "ASCII_INPUT_MODE",
357 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SHIFT_KEY_MODE_SWITCH_ASCII_INPUT_MODE
},
358 { "KATAKANA_INPUT_MODE",
359 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SHIFT_KEY_MODE_SWITCH_KATAKANA_INPUT_MODE
}},
360 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SHIFT_KEY_MODE_SWITCH
,
361 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
,
363 { prefs::kLanguageMozcNumpadCharacterForm
,
365 "numpad_character_form",
366 {{ "NUMPAD_INPUT_MODE",
367 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM_NUMPAD_INPUT_MODE
},
368 { "NUMPAD_FULL_WIDTH",
369 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM_NUMPAD_FULL_WIDTH
},
370 { "NUMPAD_HALF_WIDTH",
371 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM_NUMPAD_HALF_WIDTH
},
372 { "NUMPAD_DIRECT_INPUT",
373 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM_NUMPAD_DIRECT_INPUT
}},
374 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM
,
375 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
,
378 COMPILE_ASSERT(kNumMozcMultipleChoicePrefs
==
379 arraysize(kMozcMultipleChoicePrefs
),
382 const LanguageIntegerRangePreference kMozcIntegerPrefs
[] = {
383 { prefs::kLanguageMozcSuggestionsSize
, 3, 1, 9, "suggestions_size",
384 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SUGGESTIONS_SIZE
,
385 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
}
387 COMPILE_ASSERT(kNumMozcIntegerPrefs
== arraysize(kMozcIntegerPrefs
),
390 // ---------------------------------------------------------------------------
391 // For keyboard stuff
392 // ---------------------------------------------------------------------------
393 const int kXkbAutoRepeatDelayInMs
= 500;
394 const int kXkbAutoRepeatIntervalInMs
= 50;
395 const char kPreferredKeyboardLayout
[] = "PreferredKeyboardLayout";
397 void RegisterPrefs(PrefRegistrySimple
* registry
) {
398 // We use an empty string here rather than a hardware keyboard layout name
399 // since input_method::GetHardwareInputMethodId() might return a fallback
400 // layout name if registry->RegisterStringPref(kHardwareKeyboardLayout)
401 // is not called yet.
402 registry
->RegisterStringPref(kPreferredKeyboardLayout
, "");
405 } // namespace language_prefs
406 } // namespace chromeos