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

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

Issue 2250473006: Settings to remap Backspace and Escape keys (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@KeyboardRemapToCapsLockBackspace
Patch Set: rebase Created 4 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
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 <vector> 7 #include <vector>
8 8
9 #include "ash/autoclick/autoclick_controller.h" 9 #include "ash/autoclick/autoclick_controller.h"
10 #include "ash/common/accessibility_types.h" 10 #include "ash/common/accessibility_types.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 registry->RegisterIntegerPref( 249 registry->RegisterIntegerPref(
250 prefs::kLanguageRemapAltKeyTo, 250 prefs::kLanguageRemapAltKeyTo,
251 input_method::kAltKey, 251 input_method::kAltKey,
252 user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); 252 user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF);
253 // We don't sync the CapsLock remapping pref, since the UI hides this pref 253 // We don't sync the CapsLock remapping pref, since the UI hides this pref
254 // on certain devices, so syncing a non-default value to a device that 254 // on certain devices, so syncing a non-default value to a device that
255 // doesn't allow changing the pref would be odd. http://crbug.com/167237 255 // doesn't allow changing the pref would be odd. http://crbug.com/167237
256 registry->RegisterIntegerPref(prefs::kLanguageRemapCapsLockKeyTo, 256 registry->RegisterIntegerPref(prefs::kLanguageRemapCapsLockKeyTo,
257 input_method::kCapsLockKey); 257 input_method::kCapsLockKey);
258 registry->RegisterIntegerPref( 258 registry->RegisterIntegerPref(
259 prefs::kLanguageRemapDiamondKeyTo, 259 prefs::kLanguageRemapEscapeKeyTo, input_method::kEscapeKey,
260 input_method::kControlKey, 260 user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF);
261 registry->RegisterIntegerPref(
262 prefs::kLanguageRemapBackspaceKeyTo, input_method::kBackspaceKey,
263 user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF);
264 registry->RegisterIntegerPref(
265 prefs::kLanguageRemapDiamondKeyTo, input_method::kControlKey,
261 user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); 266 user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF);
262 // The following pref isn't synced since the user may desire a different value 267 // The following pref isn't synced since the user may desire a different value
263 // depending on whether an external keyboard is attached to a particular 268 // depending on whether an external keyboard is attached to a particular
264 // device. 269 // device.
265 registry->RegisterBooleanPref(prefs::kLanguageSendFunctionKeys, false); 270 registry->RegisterBooleanPref(prefs::kLanguageSendFunctionKeys, false);
266 registry->RegisterBooleanPref( 271 registry->RegisterBooleanPref(
267 prefs::kLanguageXkbAutoRepeatEnabled, 272 prefs::kLanguageXkbAutoRepeatEnabled,
268 true, 273 true,
269 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 274 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
270 registry->RegisterIntegerPref( 275 registry->RegisterIntegerPref(
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 touch_hud_projection_enabled_.SetValue(enabled); 784 touch_hud_projection_enabled_.SetValue(enabled);
780 } 785 }
781 786
782 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { 787 void Preferences::ActiveUserChanged(const user_manager::User* active_user) {
783 if (active_user != user_) 788 if (active_user != user_)
784 return; 789 return;
785 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); 790 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, "");
786 } 791 }
787 792
788 } // namespace chromeos 793 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698