Commit 09cf3415 authored by Yuichiro Hanada's avatar Yuichiro Hanada Committed by Commit Bot

Make Caps-Lock work as Mod3 on Neo2 keyboard layout.

This CL fixes the issue when connecting an external keyboard that has
a Caps-Lock key.
The issue happening when mapping Search key to Caps-Lock key on the
internal keyboard will be addressed later.

Bug: 747823
Test: Manual. Confirm that Caps-Lock + Q generates @ and Caps-Lock is
      not enabled after that.

Change-Id: I96c378d85ca85ce0d78bbc1ebd57bd44fb5f1a5f
Reviewed-on: https://chromium-review.googlesource.com/933667Reviewed-by: default avatarDan Erat <derat@chromium.org>
Commit-Queue: Yuichiro Hanada <yhanada@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538952}
parent 85835a01
...@@ -723,6 +723,11 @@ bool EventRewriterChromeOS::RewriteModifierKeys(const ui::KeyEvent& key_event, ...@@ -723,6 +723,11 @@ bool EventRewriterChromeOS::RewriteModifierKeys(const ui::KeyEvent& key_event,
// XK_ISO_Level3_Shift with Mod3Mask, not XF86XK_Launch7). // XK_ISO_Level3_Shift with Mod3Mask, not XF86XK_Launch7).
case ui::DomCode::F16: case ui::DomCode::F16:
case ui::DomCode::CAPS_LOCK: case ui::DomCode::CAPS_LOCK:
// This key is already remapped to Mod3 in remapping based on DomKey. Skip
// more remapping.
if (IsISOLevel5ShiftUsedByCurrentInputMethod() && remapped_key)
break;
characteristic_flag = ui::EF_CAPS_LOCK_ON; characteristic_flag = ui::EF_CAPS_LOCK_ON;
remapped_key = remapped_key =
GetRemappedKey(prefs::kLanguageRemapCapsLockKeyTo, delegate_); GetRemappedKey(prefs::kLanguageRemapCapsLockKeyTo, delegate_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment