Commit 6b730574 authored by mmeisser's avatar mmeisser Committed by Commit bot

Fixed odd behavior for keyboards using the AL_CONSUMER_CONTROL_CONFIG

This usage was mapped to XF86XK_Tools and remapped to VKEY_F13 on
chrome, which is used for LOCK (logout) causing confusion for some
users. This usage is supported on Windows and Android to launch the
default media player, therefore it is now mapped to
VKEY_MEDIA_LAUNCH_MEDIA_SELECT.

R=garykac@chromium.org, wez@chromium.org, adlr@chromium.org

BUG=398345

Review URL: https://codereview.chromium.org/442333002

Cr-Commit-Position: refs/heads/master@{#295584}
parent 03102bd6
......@@ -277,6 +277,7 @@ Martin Bednorz <m.s.bednorz@gmail.com>
Masahiro Yado <yado.masa@gmail.com>
Matheus Bratfisch <matheusbrat@gmail.com>
Mathias Bynens <mathias@qiwi.be>
Mathieu Meisser <mmeisser@logitech.com>
Matt Arpidone <mma.public@gmail.com>
Matthew Robertson <matthewrobertson03@gmail.com>
Matthew Turk <matthewturk@gmail.com>
......
......@@ -766,8 +766,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:
......@@ -815,6 +813,13 @@ KeyboardCode KeyboardCodeFromXKeysym(unsigned int keysym) {
case XF86XK_LaunchB: // F4 on an Apple keyboard.
case XF86XK_Calculator:
return VKEY_MEDIA_LAUNCH_APP2;
// XF86XK_Tools is generated from HID Usage AL_CONSUMER_CONTROL_CONFIG
// (Usage 0x0183, Page 0x0C) and most commonly launches the OS default
// media player (see crbug.com/398345).
case XF86XK_Tools:
return VKEY_MEDIA_LAUNCH_MEDIA_SELECT;
case XF86XK_WLAN:
return VKEY_WLAN;
case XF86XK_PowerOff:
......
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