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

Unified Diff: chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc

Issue 11314020: Allow Caps Lock to be remapped [part 1 of 2] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc b/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
index d762ab832685e2a22b87d55729d1009a3d0d09be..08b0ede6c7998a41ee41e06855f4eb667d4d1a93 100644
--- a/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
@@ -30,6 +30,7 @@ const char* kDataValuesNames[] = {
"remapSearchKeyToValue",
"remapControlKeyToValue",
"remapAltKeyToValue",
+ "remapCapsLockKeyToValue",
};
} // namespace
@@ -56,6 +57,9 @@ void KeyboardHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
localized_strings->SetString("remapAltKeyToContent",
l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_LEFT_ALT_LABEL));
+ localized_strings->SetString("remapCapsLockKeyToContent",
+ l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_CAPS_LOCK_LABEL));
for (size_t i = 0; i < arraysize(kDataValuesNames); ++i) {
ListValue* list_value = new ListValue();
@@ -65,6 +69,7 @@ void KeyboardHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
const int message_id = kModifierKeysSelectItems[j].message_id;
// Only the seach key can be remapped to the caps lock key.
if (kDataValuesNames[i] != std::string("remapSearchKeyToValue") &&
+ kDataValuesNames[i] != std::string("remapCapsLockKeyToValue") &&
value == input_method::kCapsLockKey) {
continue;
}

Powered by Google App Engine
This is Rietveld 408576698