Merge lp:~brandontschaefer/unity/improve-keyboard-shortcut-overlay-wording into lp:unity

Proposed by Brandon Schaefer
Status: Merged
Approved by: Brandon Schaefer
Approved revision: no longer in the source branch.
Merged at revision: 2631
Proposed branch: lp:~brandontschaefer/unity/improve-keyboard-shortcut-overlay-wording
Merge into: lp:unity
Diff against target: 507 lines (+375/-72)
2 files modified
plugins/unityshell/src/unityshell.cpp (+192/-34)
shortcuts/StandaloneShortcuts.cpp (+183/-38)
To merge this branch: bzr merge lp:~brandontschaefer/unity/improve-keyboard-shortcut-overlay-wording
Reviewer Review Type Date Requested Status
Thomi Richards (community) quality Approve
John Lea (community) Needs Fixing
Matt Price (community) copy review Approve
Marco Trevisan (Treviño) Approve
MC Return (community) Approve
Review via email: mp+119071@code.launchpad.net

Commit message

Better wording for the keyboard shortcut. Updated from Jeremy Bichas' branch.

Description of the change

To post a comment you must log in.
Revision history for this message
MC Return (mc-return) wrote :

+1

review: Approve
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) :
review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

Attempt to merge into lp:unity failed due to conflicts:

text conflict in shortcuts/StandaloneShortcuts.cpp

Revision history for this message
John Lea (johnlea) wrote :

This change should not land until Matt Price as approved the copy.

Revision history for this message
Matt Price (matt-price-s) wrote :

Hi everyone. Could you please re-submit the patch using the following copy:

Launcher
Super (hold) Opens the Launcher, displays shortcuts.
Alt + F1 Opens Launcher keyboard navigation mode.
Super + Tab Switches applications via the Launcher.
Super + 1 to 9 Same as clicking on a Launcher icon.
Super + Shift + 1 to 9 Opens a new window in the app.
Super + T Opens the Trash.

Dash
Super (tap) Opens the Dash Home.
Super + A Opens the Dash App Lens.
Super + F Opens the Dash Files Lens.
Super + M Opens the Dash Music Lens.
Super + V Opens the Dash Video Lens.
Ctrl + Tab Switches between Lenses.
Arrow Keys Moves the focus.
Enter Opens the currently focused item.

HUD & Menu Bar
Alt (tap) Opens the HUD.
Alt (hold) Reveals the application menu.
Alt + F10 Opens the indicator menu.
Cursor left or right Moves focus between indicators.

Switching
Alt + Tab Switches between applications.
Alt + ‘ Switches windows of current applications.
Cursor left or right Moves the focus.

Workspaces
Super + E Switches between workspaces.
Ctrl + Alt + Arrow Keys Switches workspaces.
Shift + Ctrl + Alt + Arro... Moves focused window to another workspace.

Windows
Super + W Spreads all windows in the current workspace.
Ctrl + Super + D Minimises all windows.
Ctrl + Super + Up Maximises the current window.
Ctrl + Super + Down Restores or minimises the current window.
Ctrl + Super + Left or Ri... Semi-maximises the current window.
Alt + F4 Closes the current window.
Alt + Space Opens the window accessibility menu.
Ctrl + Alt + Num Places the window in corresponding position.
Super + Left Mouse Drag Moves the window.
Super + Middle Mouse D... Resizes the window.

review: Approve (copy review)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Will do Matt, Thank you.

Revision history for this message
Tim Penhey (thumper) wrote :

Matt's text above is wrong for moving and resizing above. Pretty sure it is Alt and not Super

Revision history for this message
John Lea (johnlea) wrote :

This patch should not land until:

1) Matt's changes are made

2) The following change from Matt's request is changed from

Super + Left Mouse Drag Moves the window.
Super + Middle Mouse D... Resizes the window.

to

Alt + Left Mouse Drag Moves the window.
Alt + Middle Mouse D... Resizes the window.

review: Needs Fixing
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

Approved, subject to the autopilot shortcut hint tests passing with this branch.

review: Approve (quality)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/unityshell.cpp'
2--- plugins/unityshell/src/unityshell.cpp 2012-08-27 03:00:42 +0000
3+++ plugins/unityshell/src/unityshell.cpp 2012-08-27 19:10:25 +0000
4@@ -3123,59 +3123,217 @@
5 // Launcher...
6 std::string const launcher(_("Launcher"));
7
8- hints_.push_back(std::make_shared<shortcut::Hint>(launcher, "", _(" (Press)"), _("Open Launcher, displays shortcuts."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "show_launcher" ));
9- hints_.push_back(std::make_shared<shortcut::Hint>(launcher, "", "", _("Open Launcher keyboard navigation mode."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "keyboard_focus"));
10- hints_.push_back(std::make_shared<shortcut::Hint>(launcher, "", "", _("Switch applications via Launcher."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "launcher_switcher_forward"));
11- hints_.push_back(std::make_shared<shortcut::Hint>(launcher, "", _(" + 1 to 9"), _("Same as clicking on a Launcher icon."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "show_launcher"));
12- hints_.push_back(std::make_shared<shortcut::Hint>(launcher, "", _(" + Shift + 1 to 9"), _("Open new window of the app."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "show_launcher"));
13- hints_.push_back(std::make_shared<shortcut::Hint>(launcher, "", " + T", _("Open the Trash."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "show_launcher"));
14+ hints_.push_back(std::make_shared<shortcut::Hint>(launcher, "", _(" (Hold)"),
15+ _("Opens the Launcher, displays shortcuts."),
16+ shortcut::COMPIZ_KEY_OPTION,
17+ "unityshell",
18+ "show_launcher" ));
19+
20+ hints_.push_back(std::make_shared<shortcut::Hint>(launcher, "", "",
21+ _("Opens Launcher keyboard navigation mode."),
22+ shortcut::COMPIZ_KEY_OPTION,
23+ "unityshell",
24+ "keyboard_focus"));
25+
26+ hints_.push_back(std::make_shared<shortcut::Hint>(launcher, "", "",
27+ _("Switches applications via the Launcher."),
28+ shortcut::COMPIZ_KEY_OPTION,
29+ "unityshell",
30+ "launcher_switcher_forward"));
31+
32+ hints_.push_back(std::make_shared<shortcut::Hint>(launcher, "", _(" + 1 to 9"),
33+ _("Same as clicking on a Launcher icon."),
34+ shortcut::COMPIZ_KEY_OPTION,
35+ "unityshell",
36+ "show_launcher"));
37+
38+ hints_.push_back(std::make_shared<shortcut::Hint>(launcher, "", _(" + Shift + 1 to 9"),
39+ _("Opens a new window in the app."),
40+ shortcut::COMPIZ_KEY_OPTION,
41+ "unityshell",
42+ "show_launcher"));
43+
44+ hints_.push_back(std::make_shared<shortcut::Hint>(launcher, "", " + T",
45+ _("Opens the Trash."),
46+ shortcut::COMPIZ_KEY_OPTION,
47+ "unityshell",
48+ "show_launcher"));
49+
50
51 // Dash...
52 std::string const dash( _("Dash"));
53
54- hints_.push_back(std::make_shared<shortcut::Hint>(dash, "", _(" (Tap)"), _("Open the Dash Home."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "show_launcher"));
55- hints_.push_back(std::make_shared<shortcut::Hint>(dash, "", " + A", _("Open the Dash App Lens."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "show_launcher"));
56- hints_.push_back(std::make_shared<shortcut::Hint>(dash, "", " + F", _("Open the Dash Files Lens."), shortcut::COMPIZ_KEY_OPTION,"unityshell", "show_launcher"));
57- hints_.push_back(std::make_shared<shortcut::Hint>(dash, "", " + M", _("Open the Dash Music Lens."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "show_launcher"));
58- hints_.push_back(std::make_shared<shortcut::Hint>(dash, "", " + V", _("Open the Dash Video Lens."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "show_launcher"));
59- hints_.push_back(std::make_shared<shortcut::Hint>(dash, "", "", _("Switches between Lenses."), shortcut::HARDCODED_OPTION, _("Ctrl + Tab")));
60- hints_.push_back(std::make_shared<shortcut::Hint>(dash, "", "", _("Moves the focus."), shortcut::HARDCODED_OPTION, _("Cursor Keys")));
61- hints_.push_back(std::make_shared<shortcut::Hint>(dash, "", "", _("Open currently focused item."), shortcut::HARDCODED_OPTION, _("Enter & Return")));
62+ hints_.push_back(std::make_shared<shortcut::Hint>(dash, "", _(" (Tap)"),
63+ _("Opens the Dash Home."),
64+ shortcut::COMPIZ_KEY_OPTION,
65+ "unityshell",
66+ "show_launcher"));
67+
68+ hints_.push_back(std::make_shared<shortcut::Hint>(dash, "", " + A",
69+ _("Opens the Dash App Lens."),
70+ shortcut::COMPIZ_KEY_OPTION,
71+ "unityshell",
72+ "show_launcher"));
73+
74+ hints_.push_back(std::make_shared<shortcut::Hint>(dash, "", " + F",
75+ _("Opens the Dash Files Lens."),
76+ shortcut::COMPIZ_KEY_OPTION,
77+ "unityshell",
78+ "show_launcher"));
79+
80+ hints_.push_back(std::make_shared<shortcut::Hint>(dash, "", " + M",
81+ _("Opens the Dash Music Lens."),
82+ shortcut::COMPIZ_KEY_OPTION,
83+ "unityshell",
84+ "show_launcher"));
85+
86+ hints_.push_back(std::make_shared<shortcut::Hint>(dash, "", " + V",
87+ _("Opens the Dash Video Lens."),
88+ shortcut::COMPIZ_KEY_OPTION,
89+ "unityshell",
90+ "show_launcher"));
91+
92+ hints_.push_back(std::make_shared<shortcut::Hint>(dash, "", "",
93+ _("Switches between Lenses."),
94+ shortcut::HARDCODED_OPTION,
95+ _("Ctrl + Tab")));
96+
97+ hints_.push_back(std::make_shared<shortcut::Hint>(dash, "", "",
98+ _("Moves the focus."),
99+ shortcut::HARDCODED_OPTION,
100+ _("Arrow Keys")));
101+
102+ hints_.push_back(std::make_shared<shortcut::Hint>(dash, "", "",
103+ _("Opens the currently focused item."),
104+ shortcut::HARDCODED_OPTION,
105+ _("Enter")));
106
107 // Menu Bar
108 std::string const menubar(_("HUD & Menu Bar"));
109
110- hints_.push_back(std::make_shared<shortcut::Hint>(menubar, "", _(" (Tap)"), _("Open the HUD."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "show_hud"));
111- hints_.push_back(std::make_shared<shortcut::Hint>(menubar, "", _(" (Press)"), _("Reveals application menu."), shortcut::HARDCODED_OPTION, "Alt"));
112- hints_.push_back(std::make_shared<shortcut::Hint>(menubar, "", "", _("Opens the indicator menu."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "panel_first_menu"));
113- hints_.push_back(std::make_shared<shortcut::Hint>(menubar, "", "", _("Moves focus between indicators."), shortcut::HARDCODED_OPTION, _("Cursor Left or Right")));
114+ hints_.push_back(std::make_shared<shortcut::Hint>(menubar, "", _(" (Tap)"),
115+ _("Opens the HUD."),
116+ shortcut::COMPIZ_KEY_OPTION,
117+ "unityshell",
118+ "show_hud"));
119+
120+ hints_.push_back(std::make_shared<shortcut::Hint>(menubar, "", " (Hold)",
121+ _("Reveals the application menu."),
122+ shortcut::HARDCODED_OPTION,
123+ "Alt"));
124+
125+ hints_.push_back(std::make_shared<shortcut::Hint>(menubar, "", "",
126+ _("Opens the indicator menu."),
127+ shortcut::COMPIZ_KEY_OPTION,
128+ "unityshell",
129+ "panel_first_menu"));
130+
131+ hints_.push_back(std::make_shared<shortcut::Hint>(menubar, "", "",
132+ _("Moves focus between indicators."),
133+ shortcut::HARDCODED_OPTION,
134+ _("Cursor Left or Right")));
135
136 // Switching
137 std::string const switching(_("Switching"));
138
139- hints_.push_back(std::make_shared<shortcut::Hint>(switching, "", "", _("Switch between applications."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "alt_tab_forward"));
140- hints_.push_back(std::make_shared<shortcut::Hint>(switching, "", "", _("Switch windows of current application."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "alt_tab_next_window"));
141- hints_.push_back(std::make_shared<shortcut::Hint>(switching, "", "", _("Moves the focus."), shortcut::HARDCODED_OPTION, _("Cursor Left or Right")));
142+ hints_.push_back(std::make_shared<shortcut::Hint>(switching, "", "",
143+ _("Switches between applications."),
144+ shortcut::COMPIZ_KEY_OPTION,
145+ "unityshell",
146+ "alt_tab_forward"));
147+
148+ hints_.push_back(std::make_shared<shortcut::Hint>(switching, "", "",
149+ _("Switches windows of current applications."),
150+ shortcut::COMPIZ_KEY_OPTION,
151+ "unityshell",
152+ "alt_tab_next_window"));
153+
154+ hints_.push_back(std::make_shared<shortcut::Hint>(switching, "", "",
155+ _("Moves the focus."),
156+ shortcut::HARDCODED_OPTION,
157+ _("Cursor Left or Right")));
158
159 // Workspaces
160 std::string const workspaces(_("Workspaces"));
161
162- hints_.push_back(std::make_shared<shortcut::Hint>(workspaces, "", "", _("Spread workspaces."), shortcut::COMPIZ_KEY_OPTION, "expo", "expo_key"));
163- hints_.push_back(std::make_shared<shortcut::Hint>(workspaces, "", _(" + Cursor Keys"), _("Switch workspaces."), shortcut::COMPIZ_METAKEY_OPTION, "wall", "left_key"));
164- hints_.push_back(std::make_shared<shortcut::Hint>(workspaces, "", _(" + Cursor Keys"), _("Move focused window to different workspace."), shortcut::COMPIZ_METAKEY_OPTION, "wall", "left_window_key"));
165+ hints_.push_back(std::make_shared<shortcut::Hint>(workspaces, "", "",
166+ _("Switches between workspaces."),
167+ shortcut::COMPIZ_KEY_OPTION,
168+ "expo",
169+ "expo_key"));
170+
171+ hints_.push_back(std::make_shared<shortcut::Hint>(workspaces, "", _(" + Arrow Keys"),
172+ _("Switches workspaces."),
173+ shortcut::COMPIZ_METAKEY_OPTION,
174+ "wall",
175+ "left_key"));
176+
177+ hints_.push_back(std::make_shared<shortcut::Hint>(workspaces, "", _(" + Arrow Keys"),
178+ _("Moves focused window to another workspace."),
179+ shortcut::COMPIZ_METAKEY_OPTION,
180+ "wall",
181+ "left_window_key"));
182+
183
184 // Windows
185 std::string const windows(_("Windows"));
186- hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", "", _("Spreads all windows in the current workspace."), shortcut::COMPIZ_KEY_OPTION, "scale", "initiate_all_key"));
187- hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", "", _("Minimises all windows."), shortcut::COMPIZ_KEY_OPTION, "core", "show_desktop_key"));
188- hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", "", _("Maximises the current window."), shortcut::COMPIZ_KEY_OPTION, "core", "maximize_window_key"));
189- hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", "", _("Restores or minimises current window."), shortcut::COMPIZ_KEY_OPTION, "core", "unmaximize_window_key"));
190- hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", _(" or Right"), _("Semi-maximises current window."), shortcut::COMPIZ_KEY_OPTION, "grid", "put_left_key"));
191- hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", "", _("Closes current window."), shortcut::COMPIZ_KEY_OPTION, "core", "close_window_key"));
192- hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", "", _("Opens window accessibility menu."), shortcut::HARDCODED_OPTION, _("Alt + Space")));
193- hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", "", _("Places window in corresponding positions."), shortcut::HARDCODED_OPTION, _("Ctrl + Alt + Num")));
194- hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", _(" Drag"), _("Move window."), shortcut::COMPIZ_MOUSE_OPTION, "move", "initiate_button"));
195- hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", _(" Drag"), _("Resize window."), shortcut::COMPIZ_MOUSE_OPTION, "resize", "initiate_button"));
196+ hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", "",
197+ _("Spreads all windows in the current workspace."),
198+ shortcut::COMPIZ_KEY_OPTION,
199+ "scale",
200+ "initiate_all_key"));
201+
202+ hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", "",
203+ _("Minimises all windows."),
204+ shortcut::COMPIZ_KEY_OPTION,
205+ "core",
206+ "show_desktop_key"));
207+
208+ hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", "",
209+ _("Maximises the current window."),
210+ shortcut::COMPIZ_KEY_OPTION,
211+ "core",
212+ "maximize_window_key"));
213+
214+ hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", "",
215+ _("Restores or minimises the current window."),
216+ shortcut::COMPIZ_KEY_OPTION,
217+ "core",
218+ "unmaximize_window_key"));
219+
220+ hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", _(" or Right"),
221+ _("Semi-maximise the current window."),
222+ shortcut::COMPIZ_KEY_OPTION,
223+ "grid",
224+ "put_left_key"));
225+
226+ hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", "",
227+ _("Closes the current window."),
228+ shortcut::COMPIZ_KEY_OPTION,
229+ "core",
230+ "close_window_key"));
231+
232+ hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", "",
233+ _("Opens the window accessibility menu."),
234+ shortcut::HARDCODED_OPTION,
235+ _("Alt + Space")));
236+
237+ hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", "",
238+ _("Places the window in corresponding position."),
239+ shortcut::HARDCODED_OPTION,
240+ _("Ctrl + Alt + Num")));
241+
242+ hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", _(" Drag"),
243+ _("Moves the window."),
244+ shortcut::COMPIZ_MOUSE_OPTION,
245+ "move",
246+ "initiate_button"));
247+
248+ hints_.push_back(std::make_shared<shortcut::Hint>(windows, "", _(" Drag"),
249+ _("Resizes the window."),
250+ shortcut::COMPIZ_MOUSE_OPTION,
251+ "resize",
252+ "initiate_button"));
253 }
254
255 void UnityScreen::InitGesturesSupport()
256
257=== modified file 'shortcuts/StandaloneShortcuts.cpp'
258--- shortcuts/StandaloneShortcuts.cpp 2012-08-15 14:05:18 +0000
259+++ shortcuts/StandaloneShortcuts.cpp 2012-08-27 19:10:25 +0000
260@@ -33,57 +33,202 @@
261 void ThreadWidgetInit(nux::NThread* thread, void* InitData)
262 {
263 std::list<std::shared_ptr<shortcut::AbstractHint>> hints;
264-
265+
266 // Launcher...
267- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Launcher"), "", _(" (Press)"), _("Open Launcher, displays shortcuts."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "show_launcher" )));
268- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Launcher"), "", "", _("Open Launcher keyboard navigation mode."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "keyboard_focus")));
269+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Launcher"), "", _(" (Hold)"),
270+ _("Opens the Launcher, displays shortcuts."),
271+ shortcut::COMPIZ_KEY_OPTION,
272+ "unityshell",
273+ "show_launcher" )));
274+
275+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Launcher"), "", "",
276+ _("Opens Launcher keyboard navigation mode."),
277+ shortcut::COMPIZ_KEY_OPTION,
278+ "unityshell",
279+ "keyboard_focus")));
280+
281 // FIXME: Implemstd::shared_ptr<shortcut::AbstractHint>(ent it...
282- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Launcher"), "", "", _("Switch application via Launcher."), shortcut::HARDCODED_OPTION, "Super + Tab")));
283- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Launcher"), "", _(" + 1 to 9"), _("Same as clicking on a Launcher icon."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "show_launcher")));
284- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Launcher"), "", _(" + Shift + 1 to 9"), _("Open a new window of the app."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "show_launcher")));
285- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Launcher"), "", " + T", _("Open the Trash."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "show_launcher")));
286+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Launcher"), "", "",
287+ _("Switches applications via the Launcher."),
288+ shortcut::HARDCODED_OPTION,
289+ "Super + Tab")));
290+
291+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Launcher"), "", _(" + 1 to 9"),
292+ _("Same as clicking on a Launcher icon."),
293+ shortcut::COMPIZ_KEY_OPTION,
294+ "unityshell",
295+ "show_launcher")));
296+
297+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Launcher"), "", _(" + Shift + 1 to 9"),
298+ _("Opens a new window in the app."),
299+ shortcut::COMPIZ_KEY_OPTION,
300+ "unityshell",
301+ "show_launcher")));
302+
303+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Launcher"), "", " + T",
304+ _("Opens the Trash."),
305+ shortcut::COMPIZ_KEY_OPTION,
306+ "unityshell",
307+ "show_launcher")));
308
309 // Dash...
310- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Dash"), "", _(" (Tap)"), _("Open the Dash Home."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "show_launcher")));
311+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Dash"), "", _(" (Tap)"),
312+ _("Opens the Dash Home."),
313+ shortcut::COMPIZ_KEY_OPTION,
314+ "unityshell",
315+ "show_launcher")));
316+
317 // These are notstd::shared_ptr<shortcut::AbstractHint>( really hardcoded...
318- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Dash"), "", " + A", _("Open the Dash App Lens."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "show_launcher")));
319- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Dash"), "", " + F", _("Open the Dash Files Lens."), shortcut::COMPIZ_KEY_OPTION,"unityshell", "show_launcher")));
320- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Dash"), "", " + M", _("Open the Dash Music Lens."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "show_launcher")));
321- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Dash"), "", "", _("Switches between Lenses."), shortcut::HARDCODED_OPTION, "Ctrl + Tab")));
322- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Dash"), "", "", _("Moves the focus."), shortcut::HARDCODED_OPTION, _("Cursor Keys"))));
323- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Dash"), "", "", _("Open currently focused item."), shortcut::HARDCODED_OPTION, _("Enter / Return"))));
324- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Dash"), "", "", _("'Run Command' mode."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "execute_command")));
325-
326- // Menu Bar
327+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Dash"), "", " + A",
328+ _("Opens the Dash App Lens."),
329+ shortcut::COMPIZ_KEY_OPTION,
330+ "unityshell",
331+ "show_launcher")));
332+
333+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Dash"), "", " + F",
334+ _("Opens the Dash Files Lens."),
335+ shortcut::COMPIZ_KEY_OPTION,
336+ "unityshell",
337+ "show_launcher")));
338+
339+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Dash"), "", " + M",
340+ _("Opens the Dash Music Lens."),
341+ shortcut::COMPIZ_KEY_OPTION,
342+ "unityshell",
343+ "show_launcher")));
344+
345+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Dash"), "", "",
346+ _("Switches between Lenses."),
347+ shortcut::HARDCODED_OPTION,
348+ "Ctrl + Tab")));
349+
350+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Dash"), "", "",
351+ _("Moves the focus."),
352+ shortcut::HARDCODED_OPTION,
353+ _("Arrow Keys"))));
354+
355+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Dash"), "", "",
356+ _("Opens the currently focused item."),
357+ shortcut::HARDCODED_OPTION,
358+ _("Enter"))));
359+
360+ // Hud Menu Bar
361+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("HUD & Menu Bar"), "", _(" (Tap)"),
362+ _("Opens the HUD."),
363+ shortcut::COMPIZ_KEY_OPTION,
364+ "unityshell",
365+ "show_hud")));
366+
367 // Is it really std::shared_ptr<shortcut::AbstractHint>(hard coded?
368- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Menu Bar"), "", "", _("Reveals application menu."), shortcut::HARDCODED_OPTION, "Alt")));
369- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Menu Bar"), "", "", _("Opens the indicator menu."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "panel_first_menu")));
370- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Menu Bar"), "", "", _("Moves focus between indicators."), shortcut::HARDCODED_OPTION, _("Cursor Left & Right"))));
371+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("HUD & Menu Bar"), "", _(" (Hold)"),
372+ _("Reveals the application menu."),
373+ shortcut::HARDCODED_OPTION,
374+ "Alt")));
375+
376+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("HUD & Menu Bar"), "", "",
377+ _("Opens the indicator menu."),
378+ shortcut::COMPIZ_KEY_OPTION,
379+ "unityshell",
380+ "panel_first_menu")));
381+
382+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("HUD & Menu Bar"), "", "",
383+ _("Moves focus between indicators."),
384+ shortcut::HARDCODED_OPTION,
385+ _("Cursor Left or Right"))));
386
387 // Switching
388- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Switching"), "", "", _("Switch between applications."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "alt_tab_forward")));
389- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Switching"), "", "", _("Switch windows of current application."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "alt_tab_next_window")));
390- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Switching"), "", "", _("Close window switch, return to app switch."), shortcut::COMPIZ_KEY_OPTION, "unityshell", "alt_tab_detail_stop")));
391- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Switching"), "", "", _("Moves the focus."), shortcut::HARDCODED_OPTION, _("Cursor Left & Right"))));
392+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Switching"), "", "",
393+ _("Switches between applications."),
394+ shortcut::COMPIZ_KEY_OPTION,
395+ "unityshell",
396+ "alt_tab_forward")));
397+
398+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Switching"), "", "",
399+ _("Switches windows of current applications."),
400+ shortcut::COMPIZ_KEY_OPTION,
401+ "unityshell",
402+ "alt_tab_next_window")));
403+
404+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Switching"), "", "",
405+ _("Moves the focus."),
406+ shortcut::HARDCODED_OPTION,
407+ _("Cursor Left or Right"))));
408
409 // Workspaces
410- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Workspaces"), "", "", _("Spread workspaces."), shortcut::COMPIZ_KEY_OPTION, "expo", "expo_key")));
411- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Workspaces"), "", "", _("Switch workspaces."), shortcut::HARDCODED_OPTION, _("Cursor Keys"))));
412+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Workspaces"), "", "",
413+ _("Switches between workspaces."),
414+ shortcut::COMPIZ_KEY_OPTION,
415+ "expo",
416+ "expo_key")));
417+
418+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Workspaces"), "", "",
419+ _("Switches workspaces."),
420+ shortcut::HARDCODED_OPTION,
421+ _("Arrow Keys"))));
422+
423 //hints.push_bacstd::shared_ptr<shortcut::AbstractHint>(k(new shortcut::MockHint(_("Workspaces"), "", "", _("Move focused window to other workspace."), ...)
424
425 // Windows
426- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "", _("Spreads all windows in current workspace."), shortcut::COMPIZ_KEY_OPTION, "scale", "initiate_output_key")));
427- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "", _("Minimises all windows."), shortcut::COMPIZ_KEY_OPTION, "core", "show_desktop_key")));
428+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "",
429+ _("Spreads all windows in the current workspace."),
430+ shortcut::COMPIZ_KEY_OPTION,
431+ "scale",
432+ "initiate_output_key")));
433+
434+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "",
435+ _("Minimises all windows."),
436+ shortcut::COMPIZ_KEY_OPTION,
437+ "core",
438+ "show_desktop_key")));
439+
440+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "",
441+ _("Maximises the current window."),
442+ shortcut::COMPIZ_KEY_OPTION,
443+ "core",
444+ "maximize_window_key")));
445+
446+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "",
447+ _("Restores or minimises the current window."),
448+ shortcut::COMPIZ_KEY_OPTION,
449+ "core",
450+ "unmaximize_window_key")));
451+
452+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", _(" or Right"),
453+ _("Semi-maximises the current window."),
454+ shortcut::COMPIZ_KEY_OPTION,
455+ "grid",
456+ "put_left_key")));
457+
458+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "",
459+ _("Closes the current window."),
460+ shortcut::COMPIZ_KEY_OPTION,
461+ "core",
462+ "close_window_key")));
463+
464+
465 // I don't know std::shared_ptr<shortcut::AbstractHint>(if it is really hardcoded, but I can't find where this option is stored.
466- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "", _("Open window accessibility menu."), shortcut::HARDCODED_OPTION, "Alt+Space")));
467- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "", _("Maximises current window."), shortcut::COMPIZ_KEY_OPTION, "core", "maximize_window_key")));
468- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "", _("Un-maximises current window."), shortcut::COMPIZ_KEY_OPTION, "core", "unmaximize_window_key")));
469- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "", _("Minimises current window."), shortcut::COMPIZ_KEY_OPTION, "core", "minimize_window_key")));
470- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "", _("Resizes current window."), shortcut::COMPIZ_KEY_OPTION, "resize", "initiate_key")));
471- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "", _("Closes current window."), shortcut::COMPIZ_KEY_OPTION, "core", "close_window_key")));
472- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "", _("Places window in corresponding positions."), shortcut::HARDCODED_OPTION, "Ctrl + Alt + Num")));
473- hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "", _("Move window."), shortcut::COMPIZ_KEY_OPTION, "move", "initiate_key")));
474-
475+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "",
476+ _("Opens the window accessibility menu."),
477+ shortcut::HARDCODED_OPTION,
478+ "Alt+Space")));
479+
480+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "",
481+ _("Places the window in corresponding position."),
482+ shortcut::HARDCODED_OPTION,
483+ "Ctrl + Alt + Num")));
484+
485+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "",
486+ _("Moves the window."),
487+ shortcut::COMPIZ_KEY_OPTION,
488+ "move",
489+ "initiate_key")));
490+
491+ hints.push_back(std::shared_ptr<shortcut::AbstractHint>(new shortcut::MockHint(_("Windows"), "", "",
492+ _("Resizes the current window."),
493+ shortcut::COMPIZ_KEY_OPTION,
494+ "resize",
495+ "initiate_key")));
496+
497 controller.reset(new shortcut::Controller(hints));
498 controller->Show();
499 }
500@@ -94,7 +239,7 @@
501 gtk_init(&argc, &argv);
502
503 nux::NuxInitialize(0);
504-
505+
506 BackgroundEffectHelper::blur_type = BLUR_NONE;
507 nux::WindowThread* wt = nux::CreateGUIThread(TEXT("Unity Shortcut Hint Overlay"), 1200, 720, 0, &ThreadWidgetInit, 0);
508