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

Side by Side Diff: ash/common/accelerators/accelerator_table.cc

Issue 2686833005: Fix the toggle caps lock accelerator not always working. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 {false, ui::VKEY_LWIN, ui::EF_ALT_DOWN, TOGGLE_CAPS_LOCK}, 87 {false, ui::VKEY_LWIN, ui::EF_ALT_DOWN, TOGGLE_CAPS_LOCK},
88 {false, ui::VKEY_MENU, ui::EF_COMMAND_DOWN, TOGGLE_CAPS_LOCK},
James Cook 2017/02/08 22:39:08 Could you add a comment here? This is super-confus
afakhry 2017/02/09 00:28:30 Yes, it is confusing. VKEY_MENU is Alt as a key_co
James Cook 2017/02/09 01:22:21 Nice. Well written.
88 {true, ui::VKEY_VOLUME_MUTE, ui::EF_NONE, VOLUME_MUTE}, 89 {true, ui::VKEY_VOLUME_MUTE, ui::EF_NONE, VOLUME_MUTE},
89 {true, ui::VKEY_VOLUME_DOWN, ui::EF_NONE, VOLUME_DOWN}, 90 {true, ui::VKEY_VOLUME_DOWN, ui::EF_NONE, VOLUME_DOWN},
90 {true, ui::VKEY_VOLUME_UP, ui::EF_NONE, VOLUME_UP}, 91 {true, ui::VKEY_VOLUME_UP, ui::EF_NONE, VOLUME_UP},
91 {true, ui::VKEY_ESCAPE, ui::EF_COMMAND_DOWN, SHOW_TASK_MANAGER}, 92 {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}, 93 {true, ui::VKEY_SPACE, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, NEXT_IME},
93 #else 94 #else
94 // This key has been deprecated on CrOS. It is instead included below in the 95 // This key has been deprecated on CrOS. It is instead included below in the
95 // |kDeprecatedAccelerators|, and above in the CrOS accelerators as 96 // |kDeprecatedAccelerators|, and above in the CrOS accelerators as
96 // Search+Esc. 97 // Search+Esc.
97 {true, ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, SHOW_TASK_MANAGER}, 98 {true, ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, SHOW_TASK_MANAGER},
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 TOGGLE_WIFI, 528 TOGGLE_WIFI,
528 VOLUME_DOWN, 529 VOLUME_DOWN,
529 VOLUME_MUTE, 530 VOLUME_MUTE,
530 VOLUME_UP, 531 VOLUME_UP,
531 #endif // defined(OS_CHROMEOS) 532 #endif // defined(OS_CHROMEOS)
532 }; 533 };
533 534
534 const size_t kActionsKeepingMenuOpenLength = arraysize(kActionsKeepingMenuOpen); 535 const size_t kActionsKeepingMenuOpenLength = arraysize(kActionsKeepingMenuOpen);
535 536
536 } // namespace ash 537 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698