blob: 8daf09a3515c6e0a3ff1be5f34f413ac15247155 [file] [log] [blame]
Blink Reformat4c46d092018-04-07 15:32:371/*
2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
13 * distribution.
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31/**
32 * @unrestricted
33 */
34UI.ShortcutsScreen = class {
35 constructor() {
36 /** @type {!Object.<string, !UI.ShortcutsSection>} */
37 this._sections = {};
38 }
39
40 static registerShortcuts() {
41 // Elements panel
42 const elementsSection = UI.shortcutsScreen.section(Common.UIString('Elements Panel'));
43
44 const navigate = UI.ShortcutsScreen.ElementsPanelShortcuts.NavigateUp.concat(
45 UI.ShortcutsScreen.ElementsPanelShortcuts.NavigateDown);
46 elementsSection.addRelatedKeys(navigate, Common.UIString('Navigate elements'));
47
48 const expandCollapse =
49 UI.ShortcutsScreen.ElementsPanelShortcuts.Expand.concat(UI.ShortcutsScreen.ElementsPanelShortcuts.Collapse);
50 elementsSection.addRelatedKeys(expandCollapse, Common.UIString('Expand/collapse'));
51
52 elementsSection.addAlternateKeys(
53 UI.ShortcutsScreen.ElementsPanelShortcuts.EditAttribute, Common.UIString('Edit attribute'));
54 elementsSection.addAlternateKeys(
55 UI.ShortcutsScreen.ElementsPanelShortcuts.HideElement, Common.UIString('Hide element'));
56 elementsSection.addAlternateKeys(
57 UI.ShortcutsScreen.ElementsPanelShortcuts.ToggleEditAsHTML, Common.UIString('Toggle edit as HTML'));
58
59 const stylesPaneSection = UI.shortcutsScreen.section(Common.UIString('Styles Pane'));
60
61 const nextPreviousProperty = UI.ShortcutsScreen.ElementsPanelShortcuts.NextProperty.concat(
62 UI.ShortcutsScreen.ElementsPanelShortcuts.PreviousProperty);
63 stylesPaneSection.addRelatedKeys(nextPreviousProperty, Common.UIString('Next/previous property'));
64
65 stylesPaneSection.addRelatedKeys(
66 UI.ShortcutsScreen.ElementsPanelShortcuts.IncrementValue, Common.UIString('Increment value'));
67 stylesPaneSection.addRelatedKeys(
68 UI.ShortcutsScreen.ElementsPanelShortcuts.DecrementValue, Common.UIString('Decrement value'));
69
70 stylesPaneSection.addAlternateKeys(
71 UI.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy10, Common.UIString('Increment by %f', 10));
72 stylesPaneSection.addAlternateKeys(
73 UI.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy10, Common.UIString('Decrement by %f', 10));
74
75 stylesPaneSection.addAlternateKeys(
76 UI.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy100, Common.UIString('Increment by %f', 100));
77 stylesPaneSection.addAlternateKeys(
78 UI.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy100, Common.UIString('Decrement by %f', 100));
79
80 stylesPaneSection.addAlternateKeys(
81 UI.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy01, Common.UIString('Increment by %f', 0.1));
82 stylesPaneSection.addAlternateKeys(
83 UI.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy01, Common.UIString('Decrement by %f', 0.1));
84
85 // Debugger
86 let section = UI.shortcutsScreen.section(Common.UIString('Debugger'));
87
88 section.addAlternateKeys(
89 UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.toggle-pause'), Common.UIString('Pause/ Continue'));
90 section.addAlternateKeys(
91 UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.step-over'), Common.UIString('Step over'));
92 section.addAlternateKeys(
93 UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.step-into'), Common.UIString('Step into'));
94 section.addAlternateKeys(
95 UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.step-out'), Common.UIString('Step out'));
96
97 const nextAndPrevFrameKeys =
98 UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.next-call-frame')
99 .concat(UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.previous-call-frame'));
100 section.addRelatedKeys(nextAndPrevFrameKeys, Common.UIString('Next/previous call frame'));
101
102 section.addAlternateKeys(
103 UI.ShortcutsScreen.SourcesPanelShortcuts.EvaluateSelectionInConsole,
104 Common.UIString('Evaluate selection in console'));
105 section.addAlternateKeys(
106 UI.ShortcutsScreen.SourcesPanelShortcuts.AddSelectionToWatch, Common.UIString('Add selection to watch'));
107 section.addAlternateKeys(
108 UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.toggle-breakpoint'),
109 Common.UIString('Toggle breakpoint'));
110 section.addAlternateKeys(
111 UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.toggle-breakpoint-enabled'),
112 Common.UIString('Toggle breakpoint enabled'));
113 section.addAlternateKeys(
114 UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.toggle-breakpoints-active'),
115 Common.UIString('Toggle all breakpoints'));
116
117 // Editing
118 section = UI.shortcutsScreen.section(Common.UIString('Text Editor'));
119 section.addAlternateKeys(
120 UI.shortcutRegistry.shortcutDescriptorsForAction('sources.go-to-member'), Common.UIString('Go to member'));
121 section.addAlternateKeys(
122 UI.ShortcutsScreen.SourcesPanelShortcuts.ToggleAutocompletion, Common.UIString('Autocompletion'));
123 section.addAlternateKeys(
124 UI.shortcutRegistry.shortcutDescriptorsForAction('sources.go-to-line'), Common.UIString('Go to line'));
125 section.addAlternateKeys(
126 UI.shortcutRegistry.shortcutDescriptorsForAction('sources.jump-to-previous-location'),
127 Common.UIString('Jump to previous editing location'));
128 section.addAlternateKeys(
129 UI.shortcutRegistry.shortcutDescriptorsForAction('sources.jump-to-next-location'),
130 Common.UIString('Jump to next editing location'));
131 section.addAlternateKeys(UI.ShortcutsScreen.SourcesPanelShortcuts.ToggleComment, Common.UIString('Toggle comment'));
132 section.addAlternateKeys(
133 UI.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByOne, Common.UIString('Increment CSS unit by 1'));
134 section.addAlternateKeys(
135 UI.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByOne, Common.UIString('Decrement CSS unit by 1'));
136 section.addAlternateKeys(
137 UI.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByTen, Common.UIString('Increment CSS unit by 10'));
138 section.addAlternateKeys(
139 UI.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByTen, Common.UIString('Decrement CSS unit by 10'));
140 section.addAlternateKeys(
141 UI.ShortcutsScreen.SourcesPanelShortcuts.SelectNextOccurrence, Common.UIString('Select next occurrence'));
142 section.addAlternateKeys(UI.ShortcutsScreen.SourcesPanelShortcuts.SoftUndo, Common.UIString('Soft undo'));
143 section.addAlternateKeys(
144 UI.ShortcutsScreen.SourcesPanelShortcuts.GotoMatchingBracket, Common.UIString('Go to matching bracket'));
145 section.addAlternateKeys(
146 UI.shortcutRegistry.shortcutDescriptorsForAction('sources.close-editor-tab'),
147 Common.UIString('Close editor tab'));
148 section.addAlternateKeys(
149 UI.shortcutRegistry.shortcutDescriptorsForAction('sources.switch-file'),
150 Common.UIString('Switch between files with the same name and different extensions.'));
151
152 // Performance panel
153 section = UI.shortcutsScreen.section(Common.UIString('Performance Panel'));
154 section.addAlternateKeys(
155 UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.toggle-recording'),
156 Common.UIString('Start/stop recording'));
157 section.addAlternateKeys(
158 UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.record-reload'),
159 Common.UIString('Record page reload'));
160 section.addAlternateKeys(
161 UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.save-to-file'), Common.UIString('Save profile'));
162 section.addAlternateKeys(
163 UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.load-from-file'), Common.UIString('Load profile'));
164 section.addRelatedKeys(
165 UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.jump-to-previous-frame')
166 .concat(UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.jump-to-next-frame')),
167 Common.UIString('Jump to previous/next frame'));
168 section.addRelatedKeys(
169 UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.show-history'),
170 Common.UIString('Pick a recording from history'));
171 section.addRelatedKeys(
172 UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.previous-recording')
173 .concat(UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.next-recording')),
174 Common.UIString('Show previous/next recording'));
175
176 // Memory panel
177 section = UI.shortcutsScreen.section(Common.UIString('Memory Panel'));
178 section.addAlternateKeys(
179 UI.shortcutRegistry.shortcutDescriptorsForAction('profiler.heap-toggle-recording'),
180 Common.UIString('Start/stop recording'));
181
182 // Layers panel
183 section = UI.shortcutsScreen.section(Common.UIString('Layers Panel'));
184 section.addAlternateKeys(UI.ShortcutsScreen.LayersPanelShortcuts.ResetView, Common.UIString('Reset view'));
185 section.addAlternateKeys(UI.ShortcutsScreen.LayersPanelShortcuts.PanMode, Common.UIString('Switch to pan mode'));
186 section.addAlternateKeys(
187 UI.ShortcutsScreen.LayersPanelShortcuts.RotateMode, Common.UIString('Switch to rotate mode'));
188 section.addAlternateKeys(
189 UI.ShortcutsScreen.LayersPanelShortcuts.TogglePanRotate,
190 Common.UIString('Temporarily toggle pan/rotate mode while held'));
191 section.addAlternateKeys(UI.ShortcutsScreen.LayersPanelShortcuts.ZoomIn, Common.UIString('Zoom in'));
192 section.addAlternateKeys(UI.ShortcutsScreen.LayersPanelShortcuts.ZoomOut, Common.UIString('Zoom out'));
193 section.addRelatedKeys(
194 UI.ShortcutsScreen.LayersPanelShortcuts.Up.concat(UI.ShortcutsScreen.LayersPanelShortcuts.Down),
195 Common.UIString('Pan or rotate up/down'));
196 section.addRelatedKeys(
197 UI.ShortcutsScreen.LayersPanelShortcuts.Left.concat(UI.ShortcutsScreen.LayersPanelShortcuts.Right),
198 Common.UIString('Pan or rotate left/right'));
199 }
200
201 /**
202 * @param {string} name
203 * @return {!UI.ShortcutsSection}
204 */
205 section(name) {
206 let section = this._sections[name];
207 if (!section)
208 this._sections[name] = section = new UI.ShortcutsSection(name);
209 return section;
210 }
211
212 /**
213 * @return {!UI.Widget}
214 */
215 createShortcutsTabView() {
216 const orderedSections = [];
217 for (const section in this._sections)
218 orderedSections.push(this._sections[section]);
219 function compareSections(a, b) {
220 return a.order - b.order;
221 }
222 orderedSections.sort(compareSections);
223
224 const widget = new UI.Widget();
225
226 widget.element.className = 'settings-tab-container'; // Override
227 widget.element.createChild('header').createChild('h3').createTextChild(Common.UIString('Shortcuts'));
228 const scrollPane = widget.element.createChild('div', 'settings-container-wrapper');
229 const container = scrollPane.createChild('div');
230 container.className = 'settings-content settings-container';
231 for (let i = 0; i < orderedSections.length; ++i)
232 orderedSections[i].renderSection(container);
233
234 const note = scrollPane.createChild('p', 'settings-footnote');
235 note.appendChild(UI.createDocumentationLink(
236 'iterate/inspect-styles/shortcuts', Common.UIString('Full list of DevTools keyboard shortcuts and gestures')));
237
238 return widget;
239 }
240};
241
242/**
243 * We cannot initialize it here as localized strings are not loaded yet.
244 * @type {!UI.ShortcutsScreen}
245 */
246UI.shortcutsScreen;
247
248/**
249 * @unrestricted
250 */
251UI.ShortcutsSection = class {
252 /**
253 * @param {string} name
254 */
255 constructor(name) {
256 this.name = name;
257 this._lines = /** @type {!Array.<!{key: !Node, text: string}>} */ ([]);
258 this.order = ++UI.ShortcutsSection._sequenceNumber;
259 }
260
261 /**
262 * @param {!UI.KeyboardShortcut.Descriptor} key
263 * @param {string} description
264 */
265 addKey(key, description) {
266 this._addLine(this._renderKey(key), description);
267 }
268
269 /**
270 * @param {!Array.<!UI.KeyboardShortcut.Descriptor>} keys
271 * @param {string} description
272 */
273 addRelatedKeys(keys, description) {
274 this._addLine(this._renderSequence(keys, '/'), description);
275 }
276
277 /**
278 * @param {!Array.<!UI.KeyboardShortcut.Descriptor>} keys
279 * @param {string} description
280 */
281 addAlternateKeys(keys, description) {
282 this._addLine(this._renderSequence(keys, Common.UIString('or')), description);
283 }
284
285 /**
286 * @param {!Node} keyElement
287 * @param {string} description
288 */
289 _addLine(keyElement, description) {
290 this._lines.push({key: keyElement, text: description});
291 }
292
293 /**
294 * @param {!Element} container
295 */
296 renderSection(container) {
297 const parent = container.createChild('div', 'settings-block');
298
299 const headLine = parent.createChild('div', 'settings-line');
300 headLine.createChild('div', 'settings-key-cell');
301 headLine.createChild('div', 'settings-section-title settings-cell').textContent = this.name;
302
303 for (let i = 0; i < this._lines.length; ++i) {
304 const line = parent.createChild('div', 'settings-line');
305 const keyCell = line.createChild('div', 'settings-key-cell');
306 keyCell.appendChild(this._lines[i].key);
307 keyCell.appendChild(this._createSpan('settings-key-delimiter', ':'));
308 line.createChild('div', 'settings-cell').textContent = this._lines[i].text;
309 }
310 }
311
312 /**
313 * @param {!Array.<!UI.KeyboardShortcut.Descriptor>} sequence
314 * @param {string} delimiter
315 * @return {!Node}
316 */
317 _renderSequence(sequence, delimiter) {
318 const delimiterSpan = this._createSpan('settings-key-delimiter', delimiter);
319 return this._joinNodes(sequence.map(this._renderKey.bind(this)), delimiterSpan);
320 }
321
322 /**
323 * @param {!UI.KeyboardShortcut.Descriptor} key
324 * @return {!Node}
325 */
326 _renderKey(key) {
327 const keyName = key.name;
328 const plus = this._createSpan('settings-combine-keys', '+');
329 return this._joinNodes(keyName.split(' + ').map(this._createSpan.bind(this, 'settings-key')), plus);
330 }
331
332 /**
333 * @param {string} className
334 * @param {string} textContent
335 * @return {!Element}
336 */
337 _createSpan(className, textContent) {
338 const node = createElement('span');
339 node.className = className;
340 node.textContent = textContent;
341 return node;
342 }
343
344 /**
345 * @param {!Array.<!Element>} nodes
346 * @param {!Element} delimiter
347 * @return {!Node}
348 */
349 _joinNodes(nodes, delimiter) {
350 const result = createDocumentFragment();
351 for (let i = 0; i < nodes.length; ++i) {
352 if (i > 0)
353 result.appendChild(delimiter.cloneNode(true));
354 result.appendChild(nodes[i]);
355 }
356 return result;
357 }
358};
359
360UI.ShortcutsSection._sequenceNumber = 0;
361
362
363UI.ShortcutsScreen.ElementsPanelShortcuts = {
364 NavigateUp: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up)],
365
366 NavigateDown: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Down)],
367
368 Expand: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Right)],
369
370 Collapse: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Left)],
371
372 EditAttribute: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Enter)],
373
374 HideElement: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.H)],
375
376 ToggleEditAsHTML: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.F2)],
377
378 NextProperty: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Tab)],
379
380 PreviousProperty:
381 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Tab, UI.KeyboardShortcut.Modifiers.Shift)],
382
383 IncrementValue: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up)],
384
385 DecrementValue: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Down)],
386
387 IncrementBy10: [
388 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageUp),
389 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up, UI.KeyboardShortcut.Modifiers.Shift)
390 ],
391
392 DecrementBy10: [
393 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageDown),
394 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Down, UI.KeyboardShortcut.Modifiers.Shift)
395 ],
396
397 IncrementBy100:
398 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageUp, UI.KeyboardShortcut.Modifiers.Shift)],
399
400 DecrementBy100:
401 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageDown, UI.KeyboardShortcut.Modifiers.Shift)],
402
403 IncrementBy01: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up, UI.KeyboardShortcut.Modifiers.Alt)],
404
405 DecrementBy01: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Down, UI.KeyboardShortcut.Modifiers.Alt)]
406};
407
408UI.ShortcutsScreen.SourcesPanelShortcuts = {
409 SelectNextOccurrence: [UI.KeyboardShortcut.makeDescriptor('d', UI.KeyboardShortcut.Modifiers.CtrlOrMeta)],
410
411 SoftUndo: [UI.KeyboardShortcut.makeDescriptor('u', UI.KeyboardShortcut.Modifiers.CtrlOrMeta)],
412
413 GotoMatchingBracket: [UI.KeyboardShortcut.makeDescriptor('m', UI.KeyboardShortcut.Modifiers.Ctrl)],
414
415 ToggleAutocompletion:
416 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Space, UI.KeyboardShortcut.Modifiers.Ctrl)],
417
418 IncreaseCSSUnitByOne:
419 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up, UI.KeyboardShortcut.Modifiers.Alt)],
420
421 DecreaseCSSUnitByOne:
422 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Down, UI.KeyboardShortcut.Modifiers.Alt)],
423
424 IncreaseCSSUnitByTen:
425 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageUp, UI.KeyboardShortcut.Modifiers.Alt)],
426
427 DecreaseCSSUnitByTen:
428 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageDown, UI.KeyboardShortcut.Modifiers.Alt)],
429 EvaluateSelectionInConsole: [UI.KeyboardShortcut.makeDescriptor(
430 'e', UI.KeyboardShortcut.Modifiers.Shift | UI.KeyboardShortcut.Modifiers.Ctrl)],
431
432 AddSelectionToWatch: [UI.KeyboardShortcut.makeDescriptor(
433 'a', UI.KeyboardShortcut.Modifiers.Shift | UI.KeyboardShortcut.Modifiers.Ctrl)],
434
435 ToggleComment:
436 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Slash, UI.KeyboardShortcut.Modifiers.CtrlOrMeta)],
437};
438
439UI.ShortcutsScreen.LayersPanelShortcuts = {
440 ResetView: [UI.KeyboardShortcut.makeDescriptor('0')],
441
442 PanMode: [UI.KeyboardShortcut.makeDescriptor('x')],
443
444 RotateMode: [UI.KeyboardShortcut.makeDescriptor('v')],
445
446 TogglePanRotate: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Shift)],
447
448 ZoomIn: [
449 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Plus, UI.KeyboardShortcut.Modifiers.Shift),
450 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.NumpadPlus)
451 ],
452
453 ZoomOut: [
454 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Minus, UI.KeyboardShortcut.Modifiers.Shift),
455 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.NumpadMinus)
456 ],
457
458 Up: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up), UI.KeyboardShortcut.makeDescriptor('w')],
459
460 Down: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Down), UI.KeyboardShortcut.makeDescriptor('s')],
461
462 Left: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Left), UI.KeyboardShortcut.makeDescriptor('a')],
463
464 Right: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Right), UI.KeyboardShortcut.makeDescriptor('d')]
465};