Index: ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc |
diff --git a/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc b/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc |
index 5a56c8d058d58aa3ed73c64b84a1c4d2321624a2..2d47cafe2368ca7aa6bf46321379ea8fc879a958 100644 |
--- a/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc |
+++ b/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc |
@@ -788,10 +788,12 @@ |
if (*key_code == VKEY_UNKNOWN) |
*key_code = DomCodeToUsLayoutKeyboardCode(dom_code); |
} |
- // If the Control key is down, only allow ASCII control characters to be |
- // returned, regardless of the key layout. crbug.com/450849 |
- if ((flags & EF_CONTROL_DOWN) && (*character >= 0x20)) |
- *character = 0; |
+ |
+ if ((flags & EF_CONTROL_DOWN) == EF_CONTROL_DOWN) { |
+ // Use GetCharacterFromKeyCode() to set |character| to 0x0 for keys that |
+ // are not part of the accepted set of Control+Key combinations. |
+ *character = GetCharacterFromKeyCode(*key_code, flags); |
+ } |
} else if (*dom_key == DomKey::DEAD) { |
*character = DeadXkbKeySymToCombiningCharacter(xkb_keysym); |
*key_code = DomCodeToUsLayoutKeyboardCode(dom_code); |