| Index: chrome/browser/ui/ash/event_rewriter.cc
|
| diff --git a/chrome/browser/ui/ash/event_rewriter.cc b/chrome/browser/ui/ash/event_rewriter.cc
|
| index b836f1a543ab037778e3c406e1047e9827ad107a..a43ce5476f3c2df6f6fc28348aa6716c0b680757 100644
|
| --- a/chrome/browser/ui/ash/event_rewriter.cc
|
| +++ b/chrome/browser/ui/ash/event_rewriter.cc
|
| @@ -25,11 +25,13 @@
|
| #undef Status
|
|
|
| #include "base/chromeos/chromeos_version.h"
|
| +#include "base/command_line.h"
|
| #include "chrome/browser/chromeos/input_method/input_method_manager.h"
|
| #include "chrome/browser/chromeos/input_method/xkeyboard.h"
|
| #include "chrome/browser/chromeos/login/base_login_display_host.h"
|
| #include "chrome/browser/chromeos/login/user_manager.h"
|
| #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h"
|
| +#include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "ui/base/keycodes/keyboard_code_conversion_x.h"
|
| #include "ui/base/x/x11_util.h"
|
| @@ -113,12 +115,14 @@ bool IsRight(KeySym native_keysym) {
|
| }
|
|
|
| bool ShouldRemapCapsLock() {
|
| - // Since both German Neo2 XKB layout and Caps Lock depend on Mod3Mask, it's
|
| - // not possible to make both features work. For now, we don't remap Mod3Mask
|
| - // when Neo2 is in use.
|
| - // TODO(yusukes): Remove the restriction.
|
| - return InputMethodManager::GetInstance()->GetCurrentInputMethod().id() !=
|
| - kNeo2LayoutId;
|
| + return !CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kHasChromeOSKeyboard) &&
|
| + // Since both German Neo2 XKB layout and Caps Lock depend on Mod3Mask,
|
| + // it's not possible to make both features work. For now, we don't remap
|
| + // Mod3Mask when Neo2 is in use.
|
| + // TODO(yusukes): Remove the restriction.
|
| + (InputMethodManager::GetInstance()->GetCurrentInputMethod().id() !=
|
| + kNeo2LayoutId);
|
| }
|
| #endif
|
|
|
|
|