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

Side by Side Diff: chrome/browser/ui/views/accelerator_table.cc

Issue 2013293002: NOT FOR COMMIT: Make altgr+left and altgr+right navigate back/forward on views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | ui/base/accelerators/accelerator.h » ('j') | ui/base/accelerators/accelerator.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/ui/views/accelerator_table.h" 5 #include "chrome/browser/ui/views/accelerator_table.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 17 matching lines...) Expand all
28 #else 28 #else
29 const ui::EventFlags kPlatformModifier = ui::EF_CONTROL_DOWN; 29 const ui::EventFlags kPlatformModifier = ui::EF_CONTROL_DOWN;
30 #endif 30 #endif
31 31
32 // NOTE: Keep this list in the same (mostly-alphabetical) order as 32 // NOTE: Keep this list in the same (mostly-alphabetical) order as
33 // the Windows accelerators in ../../app/chrome_dll.rc. 33 // the Windows accelerators in ../../app/chrome_dll.rc.
34 // Do not use Ctrl-Alt as a shortcut modifier, as it is used by i18n keyboards: 34 // Do not use Ctrl-Alt as a shortcut modifier, as it is used by i18n keyboards:
35 // http://blogs.msdn.com/b/oldnewthing/archive/2004/03/29/101121.aspx 35 // http://blogs.msdn.com/b/oldnewthing/archive/2004/03/29/101121.aspx
36 const AcceleratorMapping kAcceleratorMap[] = { 36 const AcceleratorMapping kAcceleratorMap[] = {
37 { ui::VKEY_LEFT, ui::EF_ALT_DOWN, IDC_BACK }, 37 { ui::VKEY_LEFT, ui::EF_ALT_DOWN, IDC_BACK },
38 { ui::VKEY_LEFT, ui::EF_ALTGR_DOWN, IDC_BACK },
38 { ui::VKEY_BACK, ui::EF_NONE, IDC_BACKSPACE_BACK }, 39 { ui::VKEY_BACK, ui::EF_NONE, IDC_BACKSPACE_BACK },
39 { ui::VKEY_D, ui::EF_CONTROL_DOWN, IDC_BOOKMARK_PAGE }, 40 { ui::VKEY_D, ui::EF_CONTROL_DOWN, IDC_BOOKMARK_PAGE },
40 { ui::VKEY_D, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, 41 { ui::VKEY_D, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
41 IDC_BOOKMARK_ALL_TABS }, 42 IDC_BOOKMARK_ALL_TABS },
42 { ui::VKEY_W, ui::EF_CONTROL_DOWN, IDC_CLOSE_TAB }, 43 { ui::VKEY_W, ui::EF_CONTROL_DOWN, IDC_CLOSE_TAB },
43 { ui::VKEY_W, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_CLOSE_WINDOW }, 44 { ui::VKEY_W, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_CLOSE_WINDOW },
44 { ui::VKEY_F, ui::EF_CONTROL_DOWN, IDC_FIND }, 45 { ui::VKEY_F, ui::EF_CONTROL_DOWN, IDC_FIND },
45 { ui::VKEY_G, ui::EF_CONTROL_DOWN, IDC_FIND_NEXT }, 46 { ui::VKEY_G, ui::EF_CONTROL_DOWN, IDC_FIND_NEXT },
46 { ui::VKEY_G, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_FIND_PREVIOUS }, 47 { ui::VKEY_G, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_FIND_PREVIOUS },
47 { ui::VKEY_D, ui::EF_ALT_DOWN, IDC_FOCUS_LOCATION }, 48 { ui::VKEY_D, ui::EF_ALT_DOWN, IDC_FOCUS_LOCATION },
48 { ui::VKEY_L, ui::EF_CONTROL_DOWN, IDC_FOCUS_LOCATION }, 49 { ui::VKEY_L, ui::EF_CONTROL_DOWN, IDC_FOCUS_LOCATION },
49 { ui::VKEY_K, ui::EF_CONTROL_DOWN, IDC_FOCUS_SEARCH }, 50 { ui::VKEY_K, ui::EF_CONTROL_DOWN, IDC_FOCUS_SEARCH },
50 { ui::VKEY_E, ui::EF_CONTROL_DOWN, IDC_FOCUS_SEARCH }, 51 { ui::VKEY_E, ui::EF_CONTROL_DOWN, IDC_FOCUS_SEARCH },
51 { ui::VKEY_T, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, IDC_FOCUS_TOOLBAR }, 52 { ui::VKEY_T, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, IDC_FOCUS_TOOLBAR },
52 { ui::VKEY_B, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, IDC_FOCUS_BOOKMARKS }, 53 { ui::VKEY_B, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, IDC_FOCUS_BOOKMARKS },
53 { ui::VKEY_A, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, IDC_FOCUS_INFOBARS }, 54 { ui::VKEY_A, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, IDC_FOCUS_INFOBARS },
54 { ui::VKEY_RIGHT, ui::EF_ALT_DOWN, IDC_FORWARD }, 55 { ui::VKEY_RIGHT, ui::EF_ALT_DOWN, IDC_FORWARD },
56 { ui::VKEY_RIGHT, ui::EF_ALTGR_DOWN, IDC_FORWARD },
55 { ui::VKEY_BACK, ui::EF_SHIFT_DOWN, IDC_BACKSPACE_FORWARD }, 57 { ui::VKEY_BACK, ui::EF_SHIFT_DOWN, IDC_BACKSPACE_FORWARD },
56 { ui::VKEY_I, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_DEV_TOOLS }, 58 { ui::VKEY_I, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_DEV_TOOLS },
57 { ui::VKEY_F12, ui::EF_NONE, IDC_DEV_TOOLS_TOGGLE }, 59 { ui::VKEY_F12, ui::EF_NONE, IDC_DEV_TOOLS_TOGGLE },
58 { ui::VKEY_J, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, 60 { ui::VKEY_J, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
59 IDC_DEV_TOOLS_CONSOLE }, 61 IDC_DEV_TOOLS_CONSOLE },
60 { ui::VKEY_C, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, 62 { ui::VKEY_C, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
61 IDC_DEV_TOOLS_INSPECT }, 63 IDC_DEV_TOOLS_INSPECT },
62 { ui::VKEY_O, ui::EF_CONTROL_DOWN, IDC_OPEN_FILE }, 64 { ui::VKEY_O, ui::EF_CONTROL_DOWN, IDC_OPEN_FILE },
63 { ui::VKEY_P, ui::EF_CONTROL_DOWN, IDC_PRINT}, 65 { ui::VKEY_P, ui::EF_CONTROL_DOWN, IDC_PRINT},
64 #if defined(ENABLE_BASIC_PRINTING) 66 #if defined(ENABLE_BASIC_PRINTING)
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 *accelerator = ui::Accelerator(ui::VKEY_C, ui::EF_CONTROL_DOWN); 264 *accelerator = ui::Accelerator(ui::VKEY_C, ui::EF_CONTROL_DOWN);
263 return true; 265 return true;
264 case IDC_PASTE: 266 case IDC_PASTE:
265 *accelerator = ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN); 267 *accelerator = ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN);
266 return true; 268 return true;
267 } 269 }
268 return false; 270 return false;
269 } 271 }
270 272
271 } // namespace chrome 273 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | ui/base/accelerators/accelerator.h » ('j') | ui/base/accelerators/accelerator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698