| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/common/accelerators/accelerator_table.h" | 5 #include "ash/common/accelerators/accelerator_table.h" |
| 6 | 6 |
| 7 #include "ash/common/strings/grit/ash_strings.h" | 7 #include "ash/common/strings/grit/ash_strings.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 | 9 |
| 10 namespace ash { | 10 namespace ash { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 {true, ui::VKEY_Z, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, | 77 {true, ui::VKEY_Z, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, |
| 78 TOGGLE_SPOKEN_FEEDBACK}, | 78 TOGGLE_SPOKEN_FEEDBACK}, |
| 79 {true, ui::VKEY_OEM_COMMA, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, | 79 {true, ui::VKEY_OEM_COMMA, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, |
| 80 SWITCH_TO_PREVIOUS_USER}, | 80 SWITCH_TO_PREVIOUS_USER}, |
| 81 {true, ui::VKEY_OEM_PERIOD, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, | 81 {true, ui::VKEY_OEM_PERIOD, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, |
| 82 SWITCH_TO_NEXT_USER}, | 82 SWITCH_TO_NEXT_USER}, |
| 83 // Single shift release turns off caps lock. | 83 // Single shift release turns off caps lock. |
| 84 {false, ui::VKEY_LSHIFT, ui::EF_NONE, DISABLE_CAPS_LOCK}, | 84 {false, ui::VKEY_LSHIFT, ui::EF_NONE, DISABLE_CAPS_LOCK}, |
| 85 {false, ui::VKEY_SHIFT, ui::EF_NONE, DISABLE_CAPS_LOCK}, | 85 {false, ui::VKEY_SHIFT, ui::EF_NONE, DISABLE_CAPS_LOCK}, |
| 86 {false, ui::VKEY_RSHIFT, ui::EF_NONE, DISABLE_CAPS_LOCK}, | 86 {false, ui::VKEY_RSHIFT, ui::EF_NONE, DISABLE_CAPS_LOCK}, |
| 87 // Accelerators to toggle Caps Lock. |
| 88 // The following is triggered when Search is released while Alt is still |
| 89 // down. The key_code here is LWIN (for search) and Alt is a modifier. |
| 87 {false, ui::VKEY_LWIN, ui::EF_ALT_DOWN, TOGGLE_CAPS_LOCK}, | 90 {false, ui::VKEY_LWIN, ui::EF_ALT_DOWN, TOGGLE_CAPS_LOCK}, |
| 91 // The following is triggered when Alt is released while search is still |
| 92 // down. The key_code here is MENU (for Alt) and Search is a modifier |
| 93 // (EF_COMMAND_DOWN is used for Search as a modifier). |
| 94 {false, ui::VKEY_MENU, ui::EF_COMMAND_DOWN, TOGGLE_CAPS_LOCK}, |
| 88 {true, ui::VKEY_VOLUME_MUTE, ui::EF_NONE, VOLUME_MUTE}, | 95 {true, ui::VKEY_VOLUME_MUTE, ui::EF_NONE, VOLUME_MUTE}, |
| 89 {true, ui::VKEY_VOLUME_DOWN, ui::EF_NONE, VOLUME_DOWN}, | 96 {true, ui::VKEY_VOLUME_DOWN, ui::EF_NONE, VOLUME_DOWN}, |
| 90 {true, ui::VKEY_VOLUME_UP, ui::EF_NONE, VOLUME_UP}, | 97 {true, ui::VKEY_VOLUME_UP, ui::EF_NONE, VOLUME_UP}, |
| 91 {true, ui::VKEY_ESCAPE, ui::EF_COMMAND_DOWN, SHOW_TASK_MANAGER}, | 98 {true, ui::VKEY_ESCAPE, ui::EF_COMMAND_DOWN, SHOW_TASK_MANAGER}, |
| 92 {true, ui::VKEY_SPACE, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, NEXT_IME}, | 99 {true, ui::VKEY_SPACE, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, NEXT_IME}, |
| 93 #else | 100 #else |
| 94 // This key has been deprecated on CrOS. It is instead included below in the | 101 // This key has been deprecated on CrOS. It is instead included below in the |
| 95 // |kDeprecatedAccelerators|, and above in the CrOS accelerators as | 102 // |kDeprecatedAccelerators|, and above in the CrOS accelerators as |
| 96 // Search+Esc. | 103 // Search+Esc. |
| 97 {true, ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, SHOW_TASK_MANAGER}, | 104 {true, ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, SHOW_TASK_MANAGER}, |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 TOGGLE_WIFI, | 534 TOGGLE_WIFI, |
| 528 VOLUME_DOWN, | 535 VOLUME_DOWN, |
| 529 VOLUME_MUTE, | 536 VOLUME_MUTE, |
| 530 VOLUME_UP, | 537 VOLUME_UP, |
| 531 #endif // defined(OS_CHROMEOS) | 538 #endif // defined(OS_CHROMEOS) |
| 532 }; | 539 }; |
| 533 | 540 |
| 534 const size_t kActionsKeepingMenuOpenLength = arraysize(kActionsKeepingMenuOpen); | 541 const size_t kActionsKeepingMenuOpenLength = arraysize(kActionsKeepingMenuOpen); |
| 535 | 542 |
| 536 } // namespace ash | 543 } // namespace ash |
| OLD | NEW |