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

Unified Diff: ui/events/keycodes/keyboard_code_conversion.cc

Issue 1550953002: Keyboard events with keypad had wrong keycodes on ozone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « ui/events/keycodes/keyboard_code_conversion.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/keycodes/keyboard_code_conversion.cc
diff --git a/ui/events/keycodes/keyboard_code_conversion.cc b/ui/events/keycodes/keyboard_code_conversion.cc
index 0ac1a0c45b4e89d790bc01c8808ad76a857569cf..8ece01b1f214f98e14c5b495dbd740efc77c1326 100644
--- a/ui/events/keycodes/keyboard_code_conversion.cc
+++ b/ui/events/keycodes/keyboard_code_conversion.cc
@@ -198,6 +198,14 @@ KeyboardCode NonLocatedToLocatedKeyboardCode(KeyboardCode key_code,
return IsRightSideDomCode(dom_code) ? VKEY_RMENU : VKEY_LMENU;
case VKEY_LWIN:
return IsRightSideDomCode(dom_code) ? VKEY_RWIN : VKEY_LWIN;
+ default:
+ return NonLocatedToLocatedKeypadKeyboardCode(key_code, dom_code);
+ }
+}
+
+KeyboardCode NonLocatedToLocatedKeypadKeyboardCode(KeyboardCode key_code,
+ DomCode dom_code) {
+ switch (key_code) {
case VKEY_0:
return (dom_code == DomCode::NUMPAD0) ? VKEY_NUMPAD0 : VKEY_0;
case VKEY_1:
« no previous file with comments | « ui/events/keycodes/keyboard_code_conversion.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698