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

Unified Diff: chrome/browser/chromeos/events/event_rewriter.cc

Issue 2248163002: Allow remapping modifier keys to Caps Lock and Backspace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit_test fix 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/events/event_rewriter.cc
diff --git a/chrome/browser/chromeos/events/event_rewriter.cc b/chrome/browser/chromeos/events/event_rewriter.cc
index 1e8c6587b0f753a3ced4cb8103b092210339caab..709e8b3838fc6e4caf00eafbd2eab740c3b8277f 100644
--- a/chrome/browser/chromeos/events/event_rewriter.cc
+++ b/chrome/browser/chromeos/events/event_rewriter.cc
@@ -819,6 +819,8 @@ bool EventRewriter::RewriteModifierKeys(const ui::KeyEvent& key_event,
}
// Toggle Caps Lock if the remapped key is ui::VKEY_CAPITAL.
if (state->key_code == ui::VKEY_CAPITAL
+ // ... except on linux Chrome OS, where InputMethodChromeOS handles it.
+ && (base::SysInfo::IsRunningOnChromeOS() || ime_keyboard_for_testing_)
#if defined(USE_X11)
// ... but for X11, do nothing if the original key is ui::VKEY_CAPITAL
// (i.e. a Caps Lock key on an external keyboard is pressed) since X
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698