Make Shift+Alt+S to show the system tray bubble.
[chromium-blink-merge.git] / ash / accelerators / accelerator_table.h
blob4747bdb77cbc84fa82c156e1a939f55daec54a57
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 #ifndef ASH_ACCELERATORS_ACCELERATOR_TABLE_H_
6 #define ASH_ACCELERATORS_ACCELERATOR_TABLE_H_
8 #include "ash/ash_export.h"
9 #include "base/basictypes.h"
10 #include "ui/base/events/event_constants.h"
11 #include "ui/base/keycodes/keyboard_codes.h"
13 namespace ash {
15 // Please put if/def sections at the end of the bare section and keep the list
16 // within each section in alphabetical order.
17 enum AcceleratorAction {
18 BRIGHTNESS_DOWN,
19 BRIGHTNESS_UP,
20 CYCLE_BACKWARD_LINEAR,
21 CYCLE_BACKWARD_MRU,
22 CYCLE_FORWARD_LINEAR,
23 CYCLE_FORWARD_MRU,
24 DISABLE_CAPS_LOCK,
25 DISPLAY_TOGGLE_SCALE,
26 EXIT,
27 FOCUS_LAUNCHER,
28 FOCUS_NEXT_PANE,
29 FOCUS_PREVIOUS_PANE,
30 KEYBOARD_BRIGHTNESS_DOWN,
31 KEYBOARD_BRIGHTNESS_UP,
32 LOCK_PRESSED,
33 LOCK_RELEASED,
34 MAGNIFY_SCREEN_ZOOM_IN,
35 MAGNIFY_SCREEN_ZOOM_OUT,
36 MEDIA_NEXT_TRACK,
37 MEDIA_PLAY_PAUSE,
38 MEDIA_PREV_TRACK,
39 NEW_INCOGNITO_WINDOW,
40 NEW_TAB,
41 NEW_WINDOW,
42 NEXT_IME,
43 OPEN_FEEDBACK_PAGE,
44 PREVIOUS_IME,
45 POWER_PRESSED,
46 POWER_RELEASED,
47 RESTORE_TAB,
48 ROTATE_SCREEN,
49 ROTATE_WINDOWS,
50 SELECT_LAST_WIN,
51 SELECT_WIN_0,
52 SELECT_WIN_1,
53 SELECT_WIN_2,
54 SELECT_WIN_3,
55 SELECT_WIN_4,
56 SELECT_WIN_5,
57 SELECT_WIN_6,
58 SELECT_WIN_7,
59 SHOW_KEYBOARD_OVERLAY,
60 SHOW_OAK,
61 SHOW_SYSTEM_TRAY_BUBBLE,
62 SHOW_TASK_MANAGER,
63 SWAP_PRIMARY_DISPLAY,
64 SWITCH_IME, // Switch to another IME depending on the accelerator.
65 TAKE_PARTIAL_SCREENSHOT,
66 TAKE_SCREENSHOT,
67 TOGGLE_APP_LIST,
68 TOGGLE_CAPS_LOCK,
69 TOGGLE_CAPS_LOCK_BY_ALT_LWIN,
70 TOGGLE_DESKTOP_BACKGROUND_MODE,
71 TOGGLE_MAXIMIZED,
72 TOGGLE_ROOT_WINDOW_FULL_SCREEN,
73 TOGGLE_SPOKEN_FEEDBACK,
74 TOGGLE_WIFI,
75 VOLUME_DOWN,
76 VOLUME_MUTE,
77 VOLUME_UP,
78 WINDOW_MINIMIZE,
79 WINDOW_POSITION_CENTER,
80 WINDOW_SNAP_LEFT,
81 WINDOW_SNAP_RIGHT,
82 #if defined(OS_CHROMEOS)
83 CYCLE_DISPLAY_MODE,
84 LOCK_SCREEN,
85 OPEN_CROSH,
86 OPEN_FILE_MANAGER_DIALOG,
87 OPEN_FILE_MANAGER_TAB,
88 DISABLE_GPU_WATCHDOG,
89 #endif
90 #if !defined(NDEBUG)
91 PRINT_LAYER_HIERARCHY,
92 PRINT_VIEW_HIERARCHY,
93 PRINT_WINDOW_HIERARCHY,
94 #endif
97 struct AcceleratorData {
98 bool trigger_on_press;
99 ui::KeyboardCode keycode;
100 int modifiers;
101 AcceleratorAction action;
104 // Accelerators handled by AcceleratorController.
105 ASH_EXPORT extern const AcceleratorData kAcceleratorData[];
107 // The number of elements in kAcceleratorData.
108 ASH_EXPORT extern const size_t kAcceleratorDataLength;
110 // Debug accelerators enabled only when "Debugging keyboard shortcuts" flag
111 // (--ash-debug-shortcuts) is enabled.
112 ASH_EXPORT extern const AcceleratorData kDebugAcceleratorData[];
114 // The number of elements in kDebugAcceleratorData.
115 ASH_EXPORT extern const size_t kDebugAcceleratorDataLength;
117 // Actions that should be handled very early in Ash unless the current target
118 // window is full-screen.
119 ASH_EXPORT extern const AcceleratorAction kReservedActions[];
121 // The number of elements in kReservedActions.
122 ASH_EXPORT extern const size_t kReservedActionsLength;
124 // Actions allowed while user is not signed in or screen is locked.
125 ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtLoginOrLockScreen[];
127 // The number of elements in kActionsAllowedAtLoginOrLockScreen.
128 ASH_EXPORT extern const size_t kActionsAllowedAtLoginOrLockScreenLength;
130 // Actions allowed while screen is locked (in addition to
131 // kActionsAllowedAtLoginOrLockScreen).
132 ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtLockScreen[];
134 // The number of elements in kActionsAllowedAtLockScreen.
135 ASH_EXPORT extern const size_t kActionsAllowedAtLockScreenLength;
137 // Actions allowed while a modal window is up.
138 ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtModalWindow[];
140 // The number of elements in kActionsAllowedAtModalWindow.
141 ASH_EXPORT extern const size_t kActionsAllowedAtModalWindowLength;
143 // Actions which will not be repeated while holding an accelerator key.
144 ASH_EXPORT extern const AcceleratorAction kNonrepeatableActions[];
146 // The number of elements in kNonrepeatableActions.
147 ASH_EXPORT extern const size_t kNonrepeatableActionsLength;
149 } // namespace ash
151 #endif // ASH_ACCELERATORS_ACCELERATOR_TABLE_H_