Skip to content

Commit

Permalink
Fixed odd behavior for keyboards using the AL_CONSUMER_CONTROL_CONFIG
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
mmeisser authored and Commit bot committed Sep 18, 2014
1 parent 03102bd commit 6b73057
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
9 changes: 7 additions & 2 deletions ui/events/keycodes/keyboard_code_conversion_x.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 6b73057

Please sign in to comment.