From af1bf349ac02ae23662705e72dd712a21101ed7f Mon Sep 17 00:00:00 2001 From: "mazda@chromium.org" Date: Thu, 16 Aug 2012 20:33:40 +0000 Subject: Merge 151933 - Make KEY_WLAN toggle Wi-Fi enable/disable. BUG=139039 TEST=Check KEY_WLAN (Fn+F11) toggles Wi-Fi on Parrot. Review URL: https://chromiumcodereview.appspot.com/10830346 TBR=mazda@chromium.org Review URL: https://chromiumcodereview.appspot.com/10857045 git-svn-id: svn://svn.chromium.org/chrome/branches/1229/src@151958 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/accelerators/accelerator_table.cc | 1 + ui/base/keycodes/keyboard_code_conversion_x.cc | 4 ++++ ui/base/keycodes/keyboard_codes_posix.h | 5 +++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ash/accelerators/accelerator_table.cc b/ash/accelerators/accelerator_table.cc index a988108..f3d75e5 100644 --- a/ash/accelerators/accelerator_table.cc +++ b/ash/accelerators/accelerator_table.cc @@ -43,6 +43,7 @@ const AcceleratorData kAcceleratorData[] = { { true, ui::VKEY_F5, ui::EF_NONE, CYCLE_FORWARD_LINEAR }, { true, ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_NONE, CYCLE_FORWARD_LINEAR }, #if defined(OS_CHROMEOS) + { true, ui::VKEY_WLAN, ui::EF_NONE, TOGGLE_WIFI }, { true, ui::VKEY_BRIGHTNESS_DOWN, ui::EF_NONE, BRIGHTNESS_DOWN }, { true, ui::VKEY_BRIGHTNESS_UP, ui::EF_NONE, BRIGHTNESS_UP }, { true, ui::VKEY_KBD_BRIGHTNESS_DOWN, ui::EF_NONE, KEYBOARD_BRIGHTNESS_DOWN }, diff --git a/ui/base/keycodes/keyboard_code_conversion_x.cc b/ui/base/keycodes/keyboard_code_conversion_x.cc index 82df83f..2bfedb8 100644 --- a/ui/base/keycodes/keyboard_code_conversion_x.cc +++ b/ui/base/keycodes/keyboard_code_conversion_x.cc @@ -386,6 +386,8 @@ KeyboardCode KeyboardCodeFromXKeysym(unsigned int keysym) { case XF86XK_LaunchB: // F4 on an Apple keyboard. case XF86XK_Calculator: return VKEY_MEDIA_LAUNCH_APP2; + case XF86XK_WLAN: + return VKEY_WLAN; case XF86XK_MonBrightnessDown: return VKEY_BRIGHTNESS_DOWN; case XF86XK_MonBrightnessUp: @@ -740,6 +742,8 @@ int XKeysymForWindowsKeyCode(KeyboardCode keycode, bool shift) { return XF86XK_LaunchA; case VKEY_MEDIA_LAUNCH_APP2: return XF86XK_LaunchB; + case VKEY_WLAN: + return XF86XK_WLAN; case VKEY_BRIGHTNESS_DOWN: return XF86XK_MonBrightnessDown; case VKEY_BRIGHTNESS_UP: diff --git a/ui/base/keycodes/keyboard_codes_posix.h b/ui/base/keycodes/keyboard_codes_posix.h index bfbbacb..697a9f3 100644 --- a/ui/base/keycodes/keyboard_codes_posix.h +++ b/ui/base/keycodes/keyboard_codes_posix.h @@ -206,8 +206,9 @@ enum KeyboardCode { VKEY_OEM_CLEAR = 0xFE, VKEY_UNKNOWN = 0, - // POSIX specific VKEYs. Note that as of Windows SDK 7.1, 0xD8-DA and 0xE8 are - // unassigned. + // POSIX specific VKEYs. Note that as of Windows SDK 7.1, 0x97-9F, 0xD8-DA, + // and 0xE8 are unassigned. + VKEY_WLAN = 0x97, VKEY_BRIGHTNESS_DOWN = 0xD8, VKEY_BRIGHTNESS_UP = 0xD9, VKEY_KBD_BRIGHTNESS_DOWN = 0xDA, -- cgit v1.1