Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: chrome/browser/chromeos/language_preferences.cc

Issue 7461114: Make hanja key customizable. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed some comment Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/language_preferences.h ('k') | chrome/browser/chromeos/preferences.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "chrome/browser/chromeos/language_preferences.h" 6 #include "chrome/browser/chromeos/language_preferences.h"
7 #include "chrome/common/pref_names.h" 7 #include "chrome/common/pref_names.h"
8 #include "grit/generated_resources.h" 8 #include "grit/generated_resources.h"
9 9
10 namespace chromeos { 10 namespace chromeos {
11 namespace language_prefs { 11 namespace language_prefs {
12 12
13 // --------------------------------------------------------------------------- 13 // ---------------------------------------------------------------------------
14 // For ibus-daemon 14 // For ibus-daemon
15 // --------------------------------------------------------------------------- 15 // ---------------------------------------------------------------------------
16 const char kGeneralSectionName[] = "general"; 16 const char kGeneralSectionName[] = "general";
17 const char kHotKeySectionName[] = "general/hotkey"; 17 const char kHotKeySectionName[] = "general/hotkey";
18 const char kPreloadEnginesConfigName[] = "preload_engines"; 18 const char kPreloadEnginesConfigName[] = "preload_engines";
19 const char kNextEngineInMenuConfigName[] = "next_engine_in_menu"; 19 const char kNextEngineInMenuConfigName[] = "next_engine_in_menu";
20 const char kPreviousEngineConfigName[] = "previous_engine"; 20 const char kPreviousEngineConfigName[] = "previous_engine";
21 const char kHotkeyNextEngineInMenu[] = 21 const char kHotkeyNextEngineInMenu[] =
22 "Shift+Alt+Release+Shift_L,Shift+Alt+Release+Meta_L," 22 "Shift+Alt+Release+Shift_L,Shift+Alt+Release+Meta_L,"
23 "Shift+Alt+Release+Shift_R,Shift+Alt+Release+Meta_R," 23 "Shift+Alt+Release+Shift_R,Shift+Alt+Release+Meta_R,"
24 // TODO(yusukes): Check if the "C+S+space" hotkey is really necessary. 24 // TODO(yusukes): Check if the "C+S+space" hotkey is really necessary.
25 "Control+Shift+space"; 25 "Control+Shift+space";
26 const char kHotkeyPreviousEngine[] = "Control+space"; 26 const char kHotkeyPreviousEngine[] = "Control+space";
27 27
28 // --------------------------------------------------------------------------- 28 // ---------------------------------------------------------------------------
29 // For Traditional Chinese input method (ibus-chewing) 29 // For Traditional Chinese input method (ibus-mozc-chewing)
30 // --------------------------------------------------------------------------- 30 // ---------------------------------------------------------------------------
31 const char kChewingSectionName[] = "engine/Chewing"; 31 const char kChewingSectionName[] = "engine/Chewing";
32 32
33 // We have to sync the |ibus_config_name|s with those in 33 // We have to sync the |ibus_config_name|s with those in
34 // ibus-chewing/files/src/Config.cc. 34 // ibus-chewing/files/src/Config.cc.
35 const LanguageBooleanPrefs kChewingBooleanPrefs[] = { 35 const LanguageBooleanPrefs kChewingBooleanPrefs[] = {
36 { prefs::kLanguageChewingAutoShiftCur, false, "autoShiftCur", 36 { prefs::kLanguageChewingAutoShiftCur, false, "autoShiftCur",
37 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_AUTO_SHIFT_CUR, 37 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_AUTO_SHIFT_CUR,
38 PrefService::SYNCABLE_PREF }, 38 PrefService::SYNCABLE_PREF },
39 { prefs::kLanguageChewingAddPhraseDirection, false, "addPhraseDirection", 39 { prefs::kLanguageChewingAddPhraseDirection, false, "addPhraseDirection",
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 prefs::kLanguageChewingHsuSelKeyType, 132 prefs::kLanguageChewingHsuSelKeyType,
133 1, 133 1,
134 "hsuSelKeyType", 134 "hsuSelKeyType",
135 {{ 1, IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE_1 }, 135 {{ 1, IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE_1 },
136 { 2, IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE_2 }}, 136 { 2, IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE_2 }},
137 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE, 137 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE,
138 PrefService::SYNCABLE_PREF, 138 PrefService::SYNCABLE_PREF,
139 }; 139 };
140 140
141 // --------------------------------------------------------------------------- 141 // ---------------------------------------------------------------------------
142 // For Korean input method (ibus-hangul) 142 // For Korean input method (ibus-mozc-hangul)
143 // --------------------------------------------------------------------------- 143 // ---------------------------------------------------------------------------
144 const char kHangulSectionName[] = "engine/Hangul"; 144 const char kHangulSectionName[] = "engine/Hangul";
145 const char kHangulKeyboardConfigName[] = "HangulKeyboard"; 145 const char kHangulKeyboardConfigName[] = "HangulKeyboard";
146 const char kHangulHanjaKeysConfigName[] = "HanjaKeys"; 146 const char kHangulHanjaKeysConfigName[] = "HanjaKeys";
147 // We add Control+9 since F9 key is reserved by the window manager. 147 // We add Control+9 since F9 key is reserved by the window manager.
148 // TODO: HanjaKeys are not configurable yet (and we're not sure if it should.) 148 // TODO: HanjaKeys are not configurable yet (and we're not sure if it should.)
149 const char kHangulHanjaKeys[] = "F9,Hangul_Hanja,Control+9"; 149 const char kHangulHanjaKeys[] = "F9,Hangul_Hanja,Control+9";
150 150
151 // Mozc-hangul treats Hangul_Hanja key as hanja key event even if it is not set.
152 const char kHangulHanjaBindingKeysConfigName[] = "HanjaKeyBindings";
153 const char kHangulHanjaBindingKeys[] = "F9,Ctrl 9";
154
151 const HangulKeyboardNameIDPair kHangulKeyboardNameIDPairs[] = { 155 const HangulKeyboardNameIDPair kHangulKeyboardNameIDPairs[] = {
152 // We have to sync the |keyboard_id|s with those in 156 // We have to sync the |keyboard_id|s with those in
153 // ibus-hangul/files/setup/main.py. 157 // ibus-hangul/files/setup/main.py.
154 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_2_SET, "2" }, 158 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_2_SET, "2" },
155 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_3_SET_FINAL, 159 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_3_SET_FINAL,
156 "3f" }, 160 "3f" },
157 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_3_SET_390, "39" }, 161 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_3_SET_390, "39" },
158 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_3_SET_NO_SHIFT, 162 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_3_SET_NO_SHIFT,
159 "3s" }, 163 "3s" },
160 // We don't support "Sebeolsik 2 set" keyboard. 164 // We don't support "Sebeolsik 2 set" keyboard.
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 417
414 // --------------------------------------------------------------------------- 418 // ---------------------------------------------------------------------------
415 // For keyboard stuff 419 // For keyboard stuff
416 // --------------------------------------------------------------------------- 420 // ---------------------------------------------------------------------------
417 const int kXkbAutoRepeatDelayInMs = 500; 421 const int kXkbAutoRepeatDelayInMs = 500;
418 const int kXkbAutoRepeatIntervalInMs = 50; 422 const int kXkbAutoRepeatIntervalInMs = 50;
419 const char kPreferredKeyboardLayout[] = "PreferredKeyboardLayout"; 423 const char kPreferredKeyboardLayout[] = "PreferredKeyboardLayout";
420 424
421 } // namespace language_prefs 425 } // namespace language_prefs
422 } // namespace chromeos 426 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/language_preferences.h ('k') | chrome/browser/chromeos/preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698