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
3 // found in the LICENSE file.
5 #include "ash/accelerators/accelerator_table.h"
7 #include "base/basictypes.h"
11 const AcceleratorData kAcceleratorData
[] = {
12 // We have to define 3 entries for Shift+Alt. VKEY_[LR]MENU might be sent to
13 // the accelerator controller when RenderWidgetHostViewAura is focused, and
14 // VKEY_MENU might be when it's not (e.g. when NativeWidgetAura is focused).
15 { false, ui::VKEY_LMENU
, ui::EF_SHIFT_DOWN
, NEXT_IME
},
16 { false, ui::VKEY_MENU
, ui::EF_SHIFT_DOWN
, NEXT_IME
},
17 { false, ui::VKEY_RMENU
, ui::EF_SHIFT_DOWN
, NEXT_IME
},
18 // The same is true for Alt+Shift.
19 { false, ui::VKEY_LSHIFT
, ui::EF_ALT_DOWN
, NEXT_IME
},
20 { false, ui::VKEY_SHIFT
, ui::EF_ALT_DOWN
, NEXT_IME
},
21 { false, ui::VKEY_RSHIFT
, ui::EF_ALT_DOWN
, NEXT_IME
},
22 // Single shift release turns off caps lock.
23 { false, ui::VKEY_LSHIFT
, ui::EF_NONE
, DISABLE_CAPS_LOCK
},
24 { false, ui::VKEY_SHIFT
, ui::EF_NONE
, DISABLE_CAPS_LOCK
},
25 { false, ui::VKEY_RSHIFT
, ui::EF_NONE
, DISABLE_CAPS_LOCK
},
27 { true, ui::VKEY_SPACE
, ui::EF_CONTROL_DOWN
, PREVIOUS_IME
},
28 { false, ui::VKEY_SPACE
, ui::EF_CONTROL_DOWN
, PREVIOUS_IME
},
29 // Shortcuts for Japanese IME.
30 { true, ui::VKEY_CONVERT
, ui::EF_NONE
, SWITCH_IME
},
31 { true, ui::VKEY_NONCONVERT
, ui::EF_NONE
, SWITCH_IME
},
32 { true, ui::VKEY_DBE_SBCSCHAR
, ui::EF_NONE
, SWITCH_IME
},
33 { true, ui::VKEY_DBE_DBCSCHAR
, ui::EF_NONE
, SWITCH_IME
},
34 // Shortcut for Koren IME.
35 { true, ui::VKEY_HANGUL
, ui::EF_NONE
, SWITCH_IME
},
37 { true, ui::VKEY_TAB
, ui::EF_ALT_DOWN
, CYCLE_FORWARD_MRU
},
38 { true, ui::VKEY_TAB
, ui::EF_SHIFT_DOWN
| ui::EF_ALT_DOWN
,
40 { true, ui::VKEY_MEDIA_LAUNCH_APP1
, ui::EF_NONE
, CYCLE_LINEAR
},
41 #if defined(OS_CHROMEOS)
42 { true, ui::VKEY_BROWSER_SEARCH
, ui::EF_NONE
, TOGGLE_APP_LIST
},
43 { true, ui::VKEY_WLAN
, ui::EF_NONE
, TOGGLE_WIFI
},
44 { true, ui::VKEY_KBD_BRIGHTNESS_DOWN
, ui::EF_NONE
, KEYBOARD_BRIGHTNESS_DOWN
},
45 { true, ui::VKEY_KBD_BRIGHTNESS_UP
, ui::EF_NONE
, KEYBOARD_BRIGHTNESS_UP
},
47 { true, ui::VKEY_MEDIA_LAUNCH_APP2
, ui::EF_CONTROL_DOWN
, TOGGLE_MIRROR_MODE
},
48 { true, ui::VKEY_MEDIA_LAUNCH_APP2
, ui::EF_ALT_DOWN
, SWAP_PRIMARY_DISPLAY
},
49 // Cycle windows button.
50 { true, ui::VKEY_MEDIA_LAUNCH_APP1
, ui::EF_CONTROL_DOWN
, TAKE_SCREENSHOT
},
51 { true, ui::VKEY_MEDIA_LAUNCH_APP1
, ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
,
52 TAKE_PARTIAL_SCREENSHOT
},
53 { true, ui::VKEY_BRIGHTNESS_DOWN
, ui::EF_NONE
, BRIGHTNESS_DOWN
},
54 { true, ui::VKEY_BRIGHTNESS_DOWN
, ui::EF_ALT_DOWN
, KEYBOARD_BRIGHTNESS_DOWN
},
55 { true, ui::VKEY_BRIGHTNESS_UP
, ui::EF_NONE
, BRIGHTNESS_UP
},
56 { true, ui::VKEY_BRIGHTNESS_UP
, ui::EF_ALT_DOWN
, KEYBOARD_BRIGHTNESS_UP
},
57 { true, ui::VKEY_BRIGHTNESS_DOWN
, ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
58 MAGNIFY_SCREEN_ZOOM_OUT
},
59 { true, ui::VKEY_BRIGHTNESS_UP
, ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
60 MAGNIFY_SCREEN_ZOOM_IN
},
61 { true, ui::VKEY_L
, ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
, LOCK_SCREEN
},
62 // The lock key on Chrome OS keyboards produces F13 scancodes.
63 { true, ui::VKEY_F13
, ui::EF_NONE
, LOCK_PRESSED
},
64 { false, ui::VKEY_F13
, ui::EF_NONE
, LOCK_RELEASED
},
65 { true, ui::VKEY_POWER
, ui::EF_NONE
, POWER_PRESSED
},
66 { false, ui::VKEY_POWER
, ui::EF_NONE
, POWER_RELEASED
},
67 { true, ui::VKEY_M
, ui::EF_SHIFT_DOWN
| ui::EF_ALT_DOWN
,
69 { true, ui::VKEY_T
, ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
, OPEN_CROSH
},
70 { true, ui::VKEY_G
, ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
71 DISABLE_GPU_WATCHDOG
},
72 { true, ui::VKEY_I
, ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
73 TOUCH_HUD_MODE_CHANGE
},
74 { true, ui::VKEY_I
, ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
| ui::EF_SHIFT_DOWN
,
76 { true, ui::VKEY_9
, ui::EF_CONTROL_DOWN
| ui::EF_SHIFT_DOWN
,
77 TOUCH_HUD_PROJECTION_TOGGLE
},
78 // Accessibility: Spoken feedback shortcuts. The first one is to toggle
79 // spoken feedback on or off. The others are only valid when
80 // spoken feedback is enabled.
81 { true, ui::VKEY_Z
, ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
82 TOGGLE_SPOKEN_FEEDBACK
},
83 { true, ui::VKEY_CONTROL
, ui::EF_CONTROL_DOWN
, SILENCE_SPOKEN_FEEDBACK
},
84 { true, ui::VKEY_OEM_COMMA
, ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
85 SWITCH_TO_PREVIOUS_USER
},
86 { true, ui::VKEY_OEM_PERIOD
, ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
87 SWITCH_TO_NEXT_USER
},
88 // Turning the TouchView maximizing mode on via hotkey for the time being.
89 // TODO(skuhne): Remove once the test isn't needed anymore.
90 { true, ui::VKEY_D
, ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
| ui::EF_SHIFT_DOWN
,
91 TOGGLE_TOUCH_VIEW_TESTING
},
92 #endif // defined(OS_CHROMEOS)
93 { true, ui::VKEY_I
, ui::EF_SHIFT_DOWN
| ui::EF_ALT_DOWN
, OPEN_FEEDBACK_PAGE
},
95 { true, ui::VKEY_Q
, ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
, EXIT
},
97 { true, ui::VKEY_N
, ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
,
98 NEW_INCOGNITO_WINDOW
},
99 { true, ui::VKEY_N
, ui::EF_CONTROL_DOWN
, NEW_WINDOW
},
100 { true, ui::VKEY_T
, ui::EF_CONTROL_DOWN
, NEW_TAB
},
101 { true, ui::VKEY_OEM_MINUS
,
102 ui::EF_CONTROL_DOWN
| ui::EF_SHIFT_DOWN
, SCALE_UI_UP
},
103 { true, ui::VKEY_OEM_PLUS
,
104 ui::EF_CONTROL_DOWN
| ui::EF_SHIFT_DOWN
, SCALE_UI_DOWN
},
106 ui::EF_CONTROL_DOWN
| ui::EF_SHIFT_DOWN
, SCALE_UI_RESET
},
107 { true, ui::VKEY_BROWSER_REFRESH
,
108 ui::EF_CONTROL_DOWN
| ui::EF_SHIFT_DOWN
, ROTATE_SCREEN
},
109 { true, ui::VKEY_BROWSER_REFRESH
,
110 ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
112 { true, ui::VKEY_T
, ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
, RESTORE_TAB
},
113 { true, ui::VKEY_PRINT
, ui::EF_NONE
, TAKE_SCREENSHOT
},
114 // On Chrome OS, Search key is mapped to LWIN. The Search key binding should
115 // act on release instead of press when using Search as a modifier key for
116 // extended keyboard shortcuts.
117 { false, ui::VKEY_LWIN
, ui::EF_NONE
, TOGGLE_APP_LIST
},
118 { false, ui::VKEY_LWIN
, ui::EF_ALT_DOWN
, TOGGLE_CAPS_LOCK
},
119 { true, ui::VKEY_MEDIA_LAUNCH_APP2
, ui::EF_NONE
, TOGGLE_FULLSCREEN
},
120 { true, ui::VKEY_MEDIA_LAUNCH_APP2
, ui::EF_SHIFT_DOWN
, TOGGLE_FULLSCREEN
},
121 { true, ui::VKEY_VOLUME_MUTE
, ui::EF_NONE
, VOLUME_MUTE
},
122 { true, ui::VKEY_VOLUME_DOWN
, ui::EF_NONE
, VOLUME_DOWN
},
123 { true, ui::VKEY_VOLUME_UP
, ui::EF_NONE
, VOLUME_UP
},
124 { true, ui::VKEY_L
, ui::EF_SHIFT_DOWN
| ui::EF_ALT_DOWN
, FOCUS_LAUNCHER
},
125 { true, ui::VKEY_HELP
, ui::EF_NONE
, SHOW_KEYBOARD_OVERLAY
},
126 { true, ui::VKEY_OEM_2
, ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
127 SHOW_KEYBOARD_OVERLAY
},
128 { true, ui::VKEY_OEM_2
,
129 ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
130 SHOW_KEYBOARD_OVERLAY
},
131 { true, ui::VKEY_F14
, ui::EF_NONE
, SHOW_KEYBOARD_OVERLAY
},
132 { true, ui::VKEY_N
, ui::EF_SHIFT_DOWN
| ui::EF_ALT_DOWN
,
133 SHOW_MESSAGE_CENTER_BUBBLE
},
134 { true, ui::VKEY_S
, ui::EF_SHIFT_DOWN
| ui::EF_ALT_DOWN
,
135 SHOW_SYSTEM_TRAY_BUBBLE
},
136 { true, ui::VKEY_ESCAPE
, ui::EF_SHIFT_DOWN
, SHOW_TASK_MANAGER
},
137 { true, ui::VKEY_1
, ui::EF_ALT_DOWN
, LAUNCH_APP_0
},
138 { true, ui::VKEY_2
, ui::EF_ALT_DOWN
, LAUNCH_APP_1
},
139 { true, ui::VKEY_3
, ui::EF_ALT_DOWN
, LAUNCH_APP_2
},
140 { true, ui::VKEY_4
, ui::EF_ALT_DOWN
, LAUNCH_APP_3
},
141 { true, ui::VKEY_5
, ui::EF_ALT_DOWN
, LAUNCH_APP_4
},
142 { true, ui::VKEY_6
, ui::EF_ALT_DOWN
, LAUNCH_APP_5
},
143 { true, ui::VKEY_7
, ui::EF_ALT_DOWN
, LAUNCH_APP_6
},
144 { true, ui::VKEY_8
, ui::EF_ALT_DOWN
, LAUNCH_APP_7
},
145 { true, ui::VKEY_9
, ui::EF_ALT_DOWN
, LAUNCH_LAST_APP
},
147 // Window management shortcuts.
148 { true, ui::VKEY_OEM_4
, ui::EF_ALT_DOWN
, WINDOW_SNAP_LEFT
},
149 { true, ui::VKEY_OEM_6
, ui::EF_ALT_DOWN
, WINDOW_SNAP_RIGHT
},
150 // The same accelerator is defined in
151 // c/b/ui/views/accelerator_table.cc in order for the web page to
152 // intercept and process this shortcut. This accelerator is used if the
153 // focused window isn't browser window nor web content.
154 // TODO(stevet/jamescook): Remove this in M33, as well as the copy
155 // referenced above. We want to move away from shortcuts bound to Ctrl
156 // because web content often uses them.
157 { true, ui::VKEY_M
, ui::EF_CONTROL_DOWN
, WINDOW_MINIMIZE
},
158 { true, ui::VKEY_OEM_MINUS
, ui::EF_ALT_DOWN
, WINDOW_MINIMIZE
},
159 { true, ui::VKEY_OEM_PLUS
, ui::EF_ALT_DOWN
, TOGGLE_MAXIMIZED
},
160 { true, ui::VKEY_OEM_PLUS
, ui::EF_SHIFT_DOWN
| ui::EF_ALT_DOWN
,
161 WINDOW_POSITION_CENTER
},
162 { true, ui::VKEY_BROWSER_FORWARD
, ui::EF_CONTROL_DOWN
, FOCUS_NEXT_PANE
},
163 { true, ui::VKEY_BROWSER_BACK
, ui::EF_CONTROL_DOWN
, FOCUS_PREVIOUS_PANE
},
165 // Media Player shortcuts.
166 { true, ui::VKEY_MEDIA_NEXT_TRACK
, ui::EF_NONE
, MEDIA_NEXT_TRACK
},
167 { true, ui::VKEY_MEDIA_PLAY_PAUSE
, ui::EF_NONE
, MEDIA_PLAY_PAUSE
},
168 { true, ui::VKEY_MEDIA_PREV_TRACK
, ui::EF_NONE
, MEDIA_PREV_TRACK
},
170 // Debugging shortcuts that need to be available to end-users in
172 { true, ui::VKEY_U
, ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
| ui::EF_SHIFT_DOWN
,
173 PRINT_UI_HIERARCHIES
},
175 { false, ui::VKEY_HOME
, ui::EF_SHIFT_DOWN
, ACCESSIBLE_FOCUS_PREVIOUS
},
176 { false, ui::VKEY_PRIOR
, ui::EF_SHIFT_DOWN
, ACCESSIBLE_FOCUS_PREVIOUS
},
177 { false, ui::VKEY_END
, ui::EF_SHIFT_DOWN
, ACCESSIBLE_FOCUS_NEXT
},
178 { false, ui::VKEY_NEXT
, ui::EF_SHIFT_DOWN
, ACCESSIBLE_FOCUS_NEXT
},
180 // TODO(yusukes): Handle VKEY_MEDIA_STOP, and
181 // VKEY_MEDIA_LAUNCH_MAIL.
184 const size_t kAcceleratorDataLength
= arraysize(kAcceleratorData
);
187 const AcceleratorData kDesktopAcceleratorData
[] = {
188 #if defined(OS_CHROMEOS)
189 // Extra shortcut for debug build to control magnifier on linux desktop.
190 { true, ui::VKEY_BRIGHTNESS_DOWN
, ui::EF_CONTROL_DOWN
,
191 MAGNIFY_SCREEN_ZOOM_OUT
},
192 { true, ui::VKEY_BRIGHTNESS_UP
, ui::EF_CONTROL_DOWN
, MAGNIFY_SCREEN_ZOOM_IN
},
193 // Extra shortcuts to lock the screen on linux desktop.
194 { true, ui::VKEY_L
, ui::EF_ALT_DOWN
, LOCK_SCREEN
},
195 { true, ui::VKEY_POWER
, ui::EF_SHIFT_DOWN
, LOCK_PRESSED
},
196 { false, ui::VKEY_POWER
, ui::EF_SHIFT_DOWN
, LOCK_RELEASED
},
197 { true, ui::VKEY_D
, ui::EF_CONTROL_DOWN
| ui::EF_SHIFT_DOWN
,
198 ADD_REMOVE_DISPLAY
},
199 { true, ui::VKEY_M
, ui::EF_CONTROL_DOWN
| ui::EF_SHIFT_DOWN
,
200 TOGGLE_MIRROR_MODE
},
201 { true, ui::VKEY_W
, ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
, TOGGLE_WIFI
},
202 // Extra shortcut for display swaping as alt-f4 is taken on linux desktop.
203 { true, ui::VKEY_S
, ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
,
204 SWAP_PRIMARY_DISPLAY
},
206 // Extra shortcut to rotate/scale up/down the screen on linux desktop.
208 ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
, ROTATE_SCREEN
},
209 // For testing on systems where Alt-Tab is already mapped.
210 { true, ui::VKEY_W
, ui::EF_ALT_DOWN
, CYCLE_FORWARD_MRU
},
212 { true, ui::VKEY_F11
, ui::EF_CONTROL_DOWN
, TOGGLE_ROOT_WINDOW_FULL_SCREEN
},
213 { true, ui::VKEY_W
, ui::EF_SHIFT_DOWN
| ui::EF_ALT_DOWN
,
214 CYCLE_BACKWARD_MRU
},
215 { true, ui::VKEY_B
, ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
216 TOGGLE_DESKTOP_BACKGROUND_MODE
},
217 { true, ui::VKEY_F
, ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
,
221 const size_t kDesktopAcceleratorDataLength
= arraysize(kDesktopAcceleratorData
);
224 const AcceleratorData kDebugAcceleratorData
[] = {
225 { true, ui::VKEY_L
, ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
226 PRINT_LAYER_HIERARCHY
},
227 { true, ui::VKEY_V
, ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
228 PRINT_VIEW_HIERARCHY
},
229 { true, ui::VKEY_W
, ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
230 PRINT_WINDOW_HIERARCHY
},
231 { true, ui::VKEY_S
, ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
232 DEBUG_TOGGLE_DEVICE_SCALE_FACTOR
},
233 { true, ui::VKEY_B
, ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
234 DEBUG_TOGGLE_SHOW_DEBUG_BORDERS
},
235 { true, ui::VKEY_F
, ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
236 DEBUG_TOGGLE_SHOW_FPS_COUNTER
},
237 { true, ui::VKEY_P
, ui::EF_SHIFT_DOWN
| ui::EF_CONTROL_DOWN
| ui::EF_ALT_DOWN
,
238 DEBUG_TOGGLE_SHOW_PAINT_RECTS
},
241 const size_t kDebugAcceleratorDataLength
= arraysize(kDebugAcceleratorData
);
243 const AcceleratorAction kReservedActions
[] = {
244 // Window cycling accelerators.
245 CYCLE_BACKWARD_MRU
, // Shift+Alt+Tab
246 CYCLE_FORWARD_MRU
, // Alt+Tab
247 #if defined(OS_CHROMEOS)
253 const size_t kReservedActionsLength
= arraysize(kReservedActions
);
255 const AcceleratorAction kReservedDebugActions
[] = {
256 PRINT_LAYER_HIERARCHY
,
257 PRINT_VIEW_HIERARCHY
,
258 PRINT_WINDOW_HIERARCHY
,
259 DEBUG_TOGGLE_DEVICE_SCALE_FACTOR
,
260 DEBUG_TOGGLE_SHOW_DEBUG_BORDERS
,
261 DEBUG_TOGGLE_SHOW_FPS_COUNTER
,
262 DEBUG_TOGGLE_SHOW_PAINT_RECTS
,
265 const size_t kReservedDebugActionsLength
= arraysize(kReservedDebugActions
);
267 const AcceleratorAction kActionsAllowedAtLoginOrLockScreen
[] = {
271 KEYBOARD_BRIGHTNESS_DOWN
,
272 KEYBOARD_BRIGHTNESS_UP
,
273 MAGNIFY_SCREEN_ZOOM_IN
, // Control+F7
274 MAGNIFY_SCREEN_ZOOM_OUT
, // Control+F6
277 PRINT_LAYER_HIERARCHY
,
278 PRINT_UI_HIERARCHIES
,
279 PRINT_VIEW_HIERARCHY
,
280 PRINT_WINDOW_HIERARCHY
,
282 SHOW_SYSTEM_TRAY_BUBBLE
,
283 SWITCH_IME
, // Switch to another IME depending on the accelerator.
284 TAKE_PARTIAL_SCREENSHOT
,
292 #if defined(OS_CHROMEOS)
293 TOGGLE_SPOKEN_FEEDBACK
,
295 DISABLE_GPU_WATCHDOG
,
298 #if defined(OS_CHROMEOS) && !defined(NDEBUG)
301 #endif // defined(OS_CHROMEOS)
304 const size_t kActionsAllowedAtLoginOrLockScreenLength
=
305 arraysize(kActionsAllowedAtLoginOrLockScreen
);
307 const AcceleratorAction kActionsAllowedAtLockScreen
[] = {
311 const size_t kActionsAllowedAtLockScreenLength
=
312 arraysize(kActionsAllowedAtLockScreen
);
314 const AcceleratorAction kActionsAllowedAtModalWindow
[] = {
319 KEYBOARD_BRIGHTNESS_DOWN
,
320 KEYBOARD_BRIGHTNESS_UP
,
321 MAGNIFY_SCREEN_ZOOM_IN
,
322 MAGNIFY_SCREEN_ZOOM_OUT
,
331 PRINT_UI_HIERARCHIES
,
332 SHOW_KEYBOARD_OVERLAY
,
334 TAKE_PARTIAL_SCREENSHOT
,
341 #if defined(OS_CHROMEOS)
342 SWAP_PRIMARY_DISPLAY
,
343 TOGGLE_SPOKEN_FEEDBACK
,
352 const size_t kActionsAllowedAtModalWindowLength
=
353 arraysize(kActionsAllowedAtModalWindow
);
355 const AcceleratorAction kNonrepeatableActions
[] = {
356 // TODO(mazda): Add other actions which should not be repeated.
361 PRINT_UI_HIERARCHIES
, // Don't fill the logs if the key is held down.
372 const size_t kNonrepeatableActionsLength
=
373 arraysize(kNonrepeatableActions
);
375 const AcceleratorAction kActionsAllowedInAppMode
[] = {
382 KEYBOARD_BRIGHTNESS_DOWN
,
383 KEYBOARD_BRIGHTNESS_UP
,
384 MAGNIFY_SCREEN_ZOOM_IN
, // Control+F7
385 MAGNIFY_SCREEN_ZOOM_OUT
, // Control+F6
393 PRINT_LAYER_HIERARCHY
,
394 PRINT_UI_HIERARCHIES
,
395 PRINT_VIEW_HIERARCHY
,
396 PRINT_WINDOW_HIERARCHY
,
401 SWITCH_IME
, // Switch to another IME depending on the accelerator.
408 #if defined(OS_CHROMEOS)
409 SWAP_PRIMARY_DISPLAY
,
410 TOGGLE_SPOKEN_FEEDBACK
,
412 DISABLE_GPU_WATCHDOG
,
414 #endif // defined(OS_CHROMEOS)
417 const size_t kActionsAllowedInAppModeLength
=
418 arraysize(kActionsAllowedInAppMode
);
420 const AcceleratorAction kActionsNeedingWindow
[] = {
421 ACCESSIBLE_FOCUS_NEXT
,
422 ACCESSIBLE_FOCUS_PREVIOUS
,
431 WINDOW_POSITION_CENTER
,
435 const size_t kActionsNeedingWindowLength
= arraysize(kActionsNeedingWindow
);