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

Unified Diff: ui/events/ozone/layout/layout_util.cc

Issue 959923002: Fix CapsLock remapping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: ui/events/ozone/layout/layout_util.cc
diff --git a/ui/events/ozone/layout/layout_util.cc b/ui/events/ozone/layout/layout_util.cc
index ea7dbd6e49a8321516260cc4f15b85b4abe3c7be..011c5b6e0700691748d9f2a74b44fa5bb6a8cb95 100644
--- a/ui/events/ozone/layout/layout_util.cc
+++ b/ui/events/ozone/layout/layout_util.cc
@@ -547,7 +547,9 @@ int ModifierDomKeyToEventFlag(DomKey key) {
case DomKey::ALT_GRAPH:
return EF_ALTGR_DOWN;
case DomKey::CAPS_LOCK:
- return EF_CAPS_LOCK_DOWN;
+ // ChromeOS historically uses EF_MOD3_DOWN for the physical Caps Lock
+ // key press, as distinct from EF_CAPS_LOCK_DOWN for the locked state.
+ return EF_MOD3_DOWN;
case DomKey::CONTROL:
return EF_CONTROL_DOWN;
case DomKey::HYPER:
@@ -558,8 +560,6 @@ int ModifierDomKeyToEventFlag(DomKey key) {
return EF_COMMAND_DOWN;
case DomKey::SHIFT:
return EF_SHIFT_DOWN;
- case DomKey::SUPER:
- return EF_MOD3_DOWN;
default:
return EF_NONE;
}
@@ -569,6 +569,7 @@ int ModifierDomKeyToEventFlag(DomKey key) {
// DomKey::FN_LOCK
// DomKey::NUM_LOCK
// DomKey::SCROLL_LOCK
+ // DomKey::SUPER
// DomKey::SYMBOL
// DomKey::SYMBOL_LOCK
}

Powered by Google App Engine
This is Rietveld 408576698