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

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

Issue 2763483002: Fix Caps Lock bug (Closed)
Patch Set: Failure due to file directory change, apply the fix Created 3 years, 8 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/accelerators/accelerator_table.h" 5 #include "ash/accelerators/accelerator_table.h"
6 6
7 #include "ash/strings/grit/ash_strings.h" 7 #include "ash/strings/grit/ash_strings.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 9
10 namespace ash { 10 namespace ash {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 {false, ui::VKEY_SHIFT, ui::EF_NONE, DISABLE_CAPS_LOCK}, 84 {false, ui::VKEY_SHIFT, ui::EF_NONE, DISABLE_CAPS_LOCK},
85 {false, ui::VKEY_RSHIFT, ui::EF_NONE, DISABLE_CAPS_LOCK}, 85 {false, ui::VKEY_RSHIFT, ui::EF_NONE, DISABLE_CAPS_LOCK},
86 // Accelerators to toggle Caps Lock. 86 // Accelerators to toggle Caps Lock.
87 // The following is triggered when Search is released while Alt is still 87 // The following is triggered when Search is released while Alt is still
88 // down. The key_code here is LWIN (for search) and Alt is a modifier. 88 // down. The key_code here is LWIN (for search) and Alt is a modifier.
89 {false, ui::VKEY_LWIN, ui::EF_ALT_DOWN, TOGGLE_CAPS_LOCK}, 89 {false, ui::VKEY_LWIN, ui::EF_ALT_DOWN, TOGGLE_CAPS_LOCK},
90 // The following is triggered when Alt is released while search is still 90 // The following is triggered when Alt is released while search is still
91 // down. The key_code here is MENU (for Alt) and Search is a modifier 91 // down. The key_code here is MENU (for Alt) and Search is a modifier
92 // (EF_COMMAND_DOWN is used for Search as a modifier). 92 // (EF_COMMAND_DOWN is used for Search as a modifier).
93 {false, ui::VKEY_MENU, ui::EF_COMMAND_DOWN, TOGGLE_CAPS_LOCK}, 93 {false, ui::VKEY_MENU, ui::EF_COMMAND_DOWN, TOGGLE_CAPS_LOCK},
94 {false, ui::VKEY_CAPITAL, ui::EF_NONE, TOGGLE_CAPS_LOCK},
94 {true, ui::VKEY_VOLUME_MUTE, ui::EF_NONE, VOLUME_MUTE}, 95 {true, ui::VKEY_VOLUME_MUTE, ui::EF_NONE, VOLUME_MUTE},
95 {true, ui::VKEY_VOLUME_DOWN, ui::EF_NONE, VOLUME_DOWN}, 96 {true, ui::VKEY_VOLUME_DOWN, ui::EF_NONE, VOLUME_DOWN},
96 {true, ui::VKEY_VOLUME_UP, ui::EF_NONE, VOLUME_UP}, 97 {true, ui::VKEY_VOLUME_UP, ui::EF_NONE, VOLUME_UP},
97 {true, ui::VKEY_ESCAPE, ui::EF_COMMAND_DOWN, SHOW_TASK_MANAGER}, 98 {true, ui::VKEY_ESCAPE, ui::EF_COMMAND_DOWN, SHOW_TASK_MANAGER},
98 {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},
99 {true, ui::VKEY_I, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, OPEN_FEEDBACK_PAGE}, 100 {true, ui::VKEY_I, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, OPEN_FEEDBACK_PAGE},
100 {true, ui::VKEY_Q, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, EXIT}, 101 {true, ui::VKEY_Q, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, EXIT},
101 {true, ui::VKEY_N, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, 102 {true, ui::VKEY_N, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
102 NEW_INCOGNITO_WINDOW}, 103 NEW_INCOGNITO_WINDOW},
103 {true, ui::VKEY_N, ui::EF_CONTROL_DOWN, NEW_WINDOW}, 104 {true, ui::VKEY_N, ui::EF_CONTROL_DOWN, NEW_WINDOW},
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 TOGGLE_SPOKEN_FEEDBACK, 502 TOGGLE_SPOKEN_FEEDBACK,
502 TOGGLE_WIFI, 503 TOGGLE_WIFI,
503 VOLUME_DOWN, 504 VOLUME_DOWN,
504 VOLUME_MUTE, 505 VOLUME_MUTE,
505 VOLUME_UP, 506 VOLUME_UP,
506 }; 507 };
507 508
508 const size_t kActionsKeepingMenuOpenLength = arraysize(kActionsKeepingMenuOpen); 509 const size_t kActionsKeepingMenuOpenLength = arraysize(kActionsKeepingMenuOpen);
509 510
510 } // namespace ash 511 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_controller_unittest.cc ('k') | ash/accelerators/accelerator_table_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698