OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/views/accelerator_table_gtk.h" | 5 #include "chrome/browser/views/accelerator_table_gtk.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/keyboard_codes.h" | 8 #include "base/keyboard_codes.h" |
9 #include "chrome/app/chrome_dll_resource.h" | 9 #include "chrome/app/chrome_dll_resource.h" |
10 | 10 |
11 namespace browser { | 11 namespace browser { |
12 | 12 |
13 const AcceleratorMapping kAcceleratorMap[] = { | 13 const AcceleratorMapping kAcceleratorMap[] = { |
| 14 // Format { keycode, shift_pressed, ctrl_pressed, alt_pressed, command_id } |
| 15 |
14 // Focus. | 16 // Focus. |
15 { base::VKEY_K, false, true, false, IDC_FOCUS_SEARCH }, | 17 { base::VKEY_K, false, true, false, IDC_FOCUS_SEARCH }, |
16 { base::VKEY_E, false, true, false, IDC_FOCUS_SEARCH }, | 18 { base::VKEY_E, false, true, false, IDC_FOCUS_SEARCH }, |
17 { base::VKEY_BROWSER_SEARCH, false, false, false, IDC_FOCUS_SEARCH }, | 19 { base::VKEY_BROWSER_SEARCH, false, false, false, IDC_FOCUS_SEARCH }, |
18 { base::VKEY_L, false, true, false, IDC_FOCUS_LOCATION }, | 20 { base::VKEY_L, false, true, false, IDC_FOCUS_LOCATION }, |
19 { base::VKEY_D, false, false, true, IDC_FOCUS_LOCATION }, | 21 { base::VKEY_D, false, false, true, IDC_FOCUS_LOCATION }, |
20 { base::VKEY_F6, false, false, false, IDC_FOCUS_LOCATION }, | 22 { base::VKEY_F6, false, false, false, IDC_FOCUS_LOCATION }, |
21 | 23 |
22 // Tab/window controls. | 24 // Tab/window controls. |
23 { base::VKEY_T, false, true, false, IDC_NEW_TAB }, | 25 { base::VKEY_T, false, true, false, IDC_NEW_TAB }, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 { base::VKEY_U, false, true, false, IDC_VIEW_SOURCE }, | 109 { base::VKEY_U, false, true, false, IDC_VIEW_SOURCE }, |
108 { base::VKEY_J, true, true, false, IDC_DEV_TOOLS }, | 110 { base::VKEY_J, true, true, false, IDC_DEV_TOOLS }, |
109 { base::VKEY_P, false, true, false, IDC_PRINT}, | 111 { base::VKEY_P, false, true, false, IDC_PRINT}, |
110 { base::VKEY_ESCAPE, true, false, false, IDC_TASK_MANAGER }, | 112 { base::VKEY_ESCAPE, true, false, false, IDC_TASK_MANAGER }, |
111 { base::VKEY_F11, false, true, true, IDC_FULLSCREEN }, | 113 { base::VKEY_F11, false, true, true, IDC_FULLSCREEN }, |
112 { base::VKEY_DELETE, false, true, true, IDC_TASK_MANAGER }, | 114 { base::VKEY_DELETE, false, true, true, IDC_TASK_MANAGER }, |
113 { base::VKEY_OEM_COMMA, false, true, false, IDC_CONTROL_PANEL }, | 115 { base::VKEY_OEM_COMMA, false, true, false, IDC_CONTROL_PANEL }, |
114 { base::VKEY_B, true, true, false, IDC_SHOW_BOOKMARK_MANAGER }, | 116 { base::VKEY_B, true, true, false, IDC_SHOW_BOOKMARK_MANAGER }, |
115 { base::VKEY_F1, false, false, false, IDC_HELP_PAGE }, | 117 { base::VKEY_F1, false, false, false, IDC_HELP_PAGE }, |
116 { base::VKEY_Q, true, true, false, IDC_EXIT }, | 118 { base::VKEY_Q, true, true, false, IDC_EXIT }, |
| 119 { base::VKEY_0, true, true, false, IDC_COMPACT_NAVBAR}, |
117 }; | 120 }; |
118 | 121 |
119 const size_t kAcceleratorMapLength = arraysize(kAcceleratorMap); | 122 const size_t kAcceleratorMapLength = arraysize(kAcceleratorMap); |
120 | 123 |
121 } // namespace browser | 124 } // namespace browser |
OLD | NEW |