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

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

Issue 13008005: Short-term fix for CapsLock remapping on chromebooks with external keyboard (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/ash/event_rewriter.cc » ('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) 2012 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/chromeos/preferences.h" 5 #include "chrome/browser/chromeos/preferences.h"
6 6
7 #include "ash/magnifier/magnifier_constants.h" 7 #include "ash/magnifier/magnifier_constants.h"
8 #include "base/chromeos/chromeos_version.h" 8 #include "base/chromeos/chromeos_version.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/time_formatting.h" 10 #include "base/i18n/time_formatting.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 registry->RegisterIntegerPref(prefs::kLanguageRemapSearchKeyTo, 227 registry->RegisterIntegerPref(prefs::kLanguageRemapSearchKeyTo,
228 input_method::kSearchKey, 228 input_method::kSearchKey,
229 PrefRegistrySyncable::SYNCABLE_PREF); 229 PrefRegistrySyncable::SYNCABLE_PREF);
230 registry->RegisterIntegerPref(prefs::kLanguageRemapControlKeyTo, 230 registry->RegisterIntegerPref(prefs::kLanguageRemapControlKeyTo,
231 input_method::kControlKey, 231 input_method::kControlKey,
232 PrefRegistrySyncable::SYNCABLE_PREF); 232 PrefRegistrySyncable::SYNCABLE_PREF);
233 registry->RegisterIntegerPref(prefs::kLanguageRemapAltKeyTo, 233 registry->RegisterIntegerPref(prefs::kLanguageRemapAltKeyTo,
234 input_method::kAltKey, 234 input_method::kAltKey,
235 PrefRegistrySyncable::SYNCABLE_PREF); 235 PrefRegistrySyncable::SYNCABLE_PREF);
236 // We don't sync the CapsLock remapping pref, since the UI hides this pref
237 // on certain devices, so syncing a non-default value to a device that
238 // doesn't allow changing the pref would be odd. http://crbug.com/167237
236 registry->RegisterIntegerPref(prefs::kLanguageRemapCapsLockKeyTo, 239 registry->RegisterIntegerPref(prefs::kLanguageRemapCapsLockKeyTo,
Yusuke Sato 2013/03/22 18:42:21 I think we need to rename kLanguageRemapCapsLockKe
David Roche 2013/03/22 19:17:11 Is changing the pref name really required, since i
237 input_method::kCapsLockKey, 240 input_method::kCapsLockKey,
238 PrefRegistrySyncable::SYNCABLE_PREF); 241 PrefRegistrySyncable::UNSYNCABLE_PREF);
239 registry->RegisterIntegerPref(prefs::kLanguageRemapDiamondKeyTo, 242 registry->RegisterIntegerPref(prefs::kLanguageRemapDiamondKeyTo,
240 input_method::kControlKey, 243 input_method::kControlKey,
241 PrefRegistrySyncable::SYNCABLE_PREF); 244 PrefRegistrySyncable::SYNCABLE_PREF);
242 // We don't sync the following keyboard prefs since they are not user- 245 // We don't sync the following keyboard prefs since they are not user-
243 // configurable. 246 // configurable.
244 registry->RegisterBooleanPref(prefs::kLanguageXkbAutoRepeatEnabled, 247 registry->RegisterBooleanPref(prefs::kLanguageXkbAutoRepeatEnabled,
245 true, 248 true,
246 PrefRegistrySyncable::UNSYNCABLE_PREF); 249 PrefRegistrySyncable::UNSYNCABLE_PREF);
247 registry->RegisterIntegerPref(prefs::kLanguageXkbAutoRepeatDelay, 250 registry->RegisterIntegerPref(prefs::kLanguageXkbAutoRepeatDelay,
248 language_prefs::kXkbAutoRepeatDelayInMs, 251 language_prefs::kXkbAutoRepeatDelayInMs,
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 874
872 input_method::AutoRepeatRate rate; 875 input_method::AutoRepeatRate rate;
873 rate.initial_delay_in_ms = xkb_auto_repeat_delay_pref_.GetValue(); 876 rate.initial_delay_in_ms = xkb_auto_repeat_delay_pref_.GetValue();
874 rate.repeat_interval_in_ms = xkb_auto_repeat_interval_pref_.GetValue(); 877 rate.repeat_interval_in_ms = xkb_auto_repeat_interval_pref_.GetValue();
875 DCHECK(rate.initial_delay_in_ms > 0); 878 DCHECK(rate.initial_delay_in_ms > 0);
876 DCHECK(rate.repeat_interval_in_ms > 0); 879 DCHECK(rate.repeat_interval_in_ms > 0);
877 input_method::XKeyboard::SetAutoRepeatRate(rate); 880 input_method::XKeyboard::SetAutoRepeatRate(rate);
878 } 881 }
879 882
880 } // namespace chromeos 883 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/ash/event_rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698