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

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

Issue 442333002: Fixed odd behavior for keyboards using the AL_CONSUMER_CONTROL_CONFIG (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: edited commit following Wez comments Created 6 years, 4 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
« no previous file with comments | « AUTHORS ('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_x.cc
diff --git a/ui/events/keycodes/keyboard_code_conversion_x.cc b/ui/events/keycodes/keyboard_code_conversion_x.cc
index efbf1d427e47edd5b6e9071e8a3d9aff1f1d85c7..f49b449a032cae990534cb415727e216601afc90 100644
--- a/ui/events/keycodes/keyboard_code_conversion_x.cc
+++ b/ui/events/keycodes/keyboard_code_conversion_x.cc
@@ -765,8 +765,6 @@ KeyboardCode KeyboardCodeFromXKeysym(unsigned int keysym) {
// https://bugs.freedesktop.org/show_bug.cgi?id=5783
// In Chrome, we map these X key symbols back to F13-18 since we don't have
// VKEYs for these XF86XK symbols.
- case XF86XK_Tools:
- return VKEY_F13;
case XF86XK_Launch5:
return VKEY_F14;
case XF86XK_Launch6:
@@ -814,6 +812,15 @@ KeyboardCode KeyboardCodeFromXKeysym(unsigned int keysym) {
case XF86XK_LaunchB: // F4 on an Apple keyboard.
case XF86XK_Calculator:
return VKEY_MEDIA_LAUNCH_APP2;
+
+ // XF86XK_Tools is mapped from HID usage AL_CONSUMER_CONTROL_CONFIG
+ // (consumer page 0x0C, usage 0x0183) and is mostly used to launch a
+ // media player app in most common OS (see crbug=398345)
Wez 2014/08/26 19:19:36 Suggest "is mapped from" -> "is generated by" Sugg
+ // map it now to VKEY_MEDIA_LAUNCH_MEDIA_SELECT which can be used to
Wez 2014/08/26 19:19:36 What VKEY does that USB usage generate under Windo
+ // later launch a media player app.
Wez 2014/08/26 19:19:36 Remove this?
+ case XF86XK_Tools:
+ return VKEY_MEDIA_LAUNCH_MEDIA_SELECT;
+
case XF86XK_WLAN:
return VKEY_WLAN;
case XF86XK_PowerOff:
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698