Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / Source / devtools / front_end / components / ShortcutsScreen.js
blobb7ca664965bfbae62eba7a8f6f70c390424b6b73
1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
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.
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.
31 /**
32 * @constructor
34 WebInspector.ShortcutsScreen = function()
36 /** @type {!Object.<string, !WebInspector.ShortcutsSection>} */
37 this._sections = {};
40 WebInspector.ShortcutsScreen.prototype = {
41 /**
42 * @param {string} name
43 * @return {!WebInspector.ShortcutsSection}
45 section: function(name)
47 var section = this._sections[name];
48 if (!section)
49 this._sections[name] = section = new WebInspector.ShortcutsSection(name);
50 return section;
53 /**
54 * @return {!WebInspector.Widget}
56 createShortcutsTabView: function()
58 var orderedSections = [];
59 for (var section in this._sections)
60 orderedSections.push(this._sections[section]);
61 function compareSections(a, b)
63 return a.order - b.order;
65 orderedSections.sort(compareSections);
67 var widget = new WebInspector.Widget();
69 widget.element.className = "settings-tab-container"; // Override
70 widget.element.createChild("header").createChild("h3").createTextChild(WebInspector.UIString("Shortcuts"));
71 var scrollPane = widget.element.createChild("div", "help-container-wrapper");
72 var container = scrollPane.createChild("div");
73 container.className = "help-content help-container";
74 for (var i = 0; i < orderedSections.length; ++i)
75 orderedSections[i].renderSection(container);
77 var note = scrollPane.createChild("p", "help-footnote");
78 note.appendChild(WebInspector.linkifyDocumentationURLAsNode("iterate/inspect-styles/shortcuts", WebInspector.UIString("Full list of DevTools keyboard shortcuts and gestures")));
80 return widget;
84 /**
85 * We cannot initialize it here as localized strings are not loaded yet.
86 * @type {!WebInspector.ShortcutsScreen}
88 WebInspector.shortcutsScreen;
90 /**
91 * @constructor
92 * @param {string} name
94 WebInspector.ShortcutsSection = function(name)
96 this.name = name;
97 this._lines = /** @type {!Array.<!{key: !Node, text: string}>} */ ([]);
98 this.order = ++WebInspector.ShortcutsSection._sequenceNumber;
101 WebInspector.ShortcutsSection._sequenceNumber = 0;
103 WebInspector.ShortcutsSection.prototype = {
105 * @param {!WebInspector.KeyboardShortcut.Descriptor} key
106 * @param {string} description
108 addKey: function(key, description)
110 this._addLine(this._renderKey(key), description);
114 * @param {!Array.<!WebInspector.KeyboardShortcut.Descriptor>} keys
115 * @param {string} description
117 addRelatedKeys: function(keys, description)
119 this._addLine(this._renderSequence(keys, "/"), description);
123 * @param {!Array.<!WebInspector.KeyboardShortcut.Descriptor>} keys
124 * @param {string} description
126 addAlternateKeys: function(keys, description)
128 this._addLine(this._renderSequence(keys, WebInspector.UIString("or")), description);
132 * @param {!Node} keyElement
133 * @param {string} description
135 _addLine: function(keyElement, description)
137 this._lines.push({ key: keyElement, text: description });
141 * @param {!Element} container
143 renderSection: function(container)
145 var parent = container.createChild("div", "help-block");
147 var headLine = parent.createChild("div", "help-line");
148 headLine.createChild("div", "help-key-cell");
149 headLine.createChild("div", "help-section-title help-cell").textContent = this.name;
151 for (var i = 0; i < this._lines.length; ++i) {
152 var line = parent.createChild("div", "help-line");
153 var keyCell = line.createChild("div", "help-key-cell");
154 keyCell.appendChild(this._lines[i].key);
155 keyCell.appendChild(this._createSpan("help-key-delimiter", ":"));
156 line.createChild("div", "help-cell").textContent = this._lines[i].text;
161 * @param {!Array.<!WebInspector.KeyboardShortcut.Descriptor>} sequence
162 * @param {string} delimiter
163 * @return {!Node}
165 _renderSequence: function(sequence, delimiter)
167 var delimiterSpan = this._createSpan("help-key-delimiter", delimiter);
168 return this._joinNodes(sequence.map(this._renderKey.bind(this)), delimiterSpan);
172 * @param {!WebInspector.KeyboardShortcut.Descriptor} key
173 * @return {!Node}
175 _renderKey: function(key)
177 var keyName = key.name;
178 var plus = this._createSpan("help-combine-keys", "+");
179 return this._joinNodes(keyName.split(" + ").map(this._createSpan.bind(this, "help-key")), plus);
183 * @param {string} className
184 * @param {string} textContent
185 * @return {!Element}
187 _createSpan: function(className, textContent)
189 var node = createElement("span");
190 node.className = className;
191 node.textContent = textContent;
192 return node;
196 * @param {!Array.<!Element>} nodes
197 * @param {!Element} delimiter
198 * @return {!Node}
200 _joinNodes: function(nodes, delimiter)
202 var result = createDocumentFragment();
203 for (var i = 0; i < nodes.length; ++i) {
204 if (i > 0)
205 result.appendChild(delimiter.cloneNode(true));
206 result.appendChild(nodes[i]);
208 return result;
212 WebInspector.ShortcutsScreen.registerShortcuts = function()
214 // Elements panel
215 var elementsSection = WebInspector.shortcutsScreen.section(WebInspector.UIString("Elements Panel"));
217 var navigate = WebInspector.ShortcutsScreen.ElementsPanelShortcuts.NavigateUp.concat(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.NavigateDown);
218 elementsSection.addRelatedKeys(navigate, WebInspector.UIString("Navigate elements"));
220 var expandCollapse = WebInspector.ShortcutsScreen.ElementsPanelShortcuts.Expand.concat(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.Collapse);
221 elementsSection.addRelatedKeys(expandCollapse, WebInspector.UIString("Expand/collapse"));
223 elementsSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.EditAttribute, WebInspector.UIString("Edit attribute"));
224 elementsSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.HideElement, WebInspector.UIString("Hide element"));
225 elementsSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.ToggleEditAsHTML, WebInspector.UIString("Toggle edit as HTML"));
227 var stylesPaneSection = WebInspector.shortcutsScreen.section(WebInspector.UIString("Styles Pane"));
229 var nextPreviousProperty = WebInspector.ShortcutsScreen.ElementsPanelShortcuts.NextProperty.concat(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.PreviousProperty);
230 stylesPaneSection.addRelatedKeys(nextPreviousProperty, WebInspector.UIString("Next/previous property"));
232 stylesPaneSection.addRelatedKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementValue, WebInspector.UIString("Increment value"));
233 stylesPaneSection.addRelatedKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementValue, WebInspector.UIString("Decrement value"));
235 stylesPaneSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy10, WebInspector.UIString("Increment by %f", 10));
236 stylesPaneSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy10, WebInspector.UIString("Decrement by %f", 10));
238 stylesPaneSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy100, WebInspector.UIString("Increment by %f", 100));
239 stylesPaneSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy100, WebInspector.UIString("Decrement by %f", 100));
241 stylesPaneSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy01, WebInspector.UIString("Increment by %f", 0.1));
242 stylesPaneSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy01, WebInspector.UIString("Decrement by %f", 0.1));
245 // Debugger
246 var section = WebInspector.shortcutsScreen.section(WebInspector.UIString("Debugger"));
248 section.addAlternateKeys(WebInspector.shortcutRegistry.shortcutDescriptorsForAction("debugger.toggle-pause"), WebInspector.UIString("Pause/ Continue"));
249 section.addAlternateKeys(WebInspector.shortcutRegistry.shortcutDescriptorsForAction("debugger.step-over"), WebInspector.UIString("Step over"));
250 section.addAlternateKeys(WebInspector.shortcutRegistry.shortcutDescriptorsForAction("debugger.step-into"), WebInspector.UIString("Step into"));
251 section.addAlternateKeys(WebInspector.shortcutRegistry.shortcutDescriptorsForAction("debugger.step-out"), WebInspector.UIString("Step out"));
252 if (Runtime.experiments.isEnabled("stepIntoAsync"))
253 section.addAlternateKeys(WebInspector.shortcutRegistry.shortcutDescriptorsForAction("debugger.step-into"), WebInspector.UIString("Step into"));
255 var nextAndPrevFrameKeys = WebInspector.ShortcutsScreen.SourcesPanelShortcuts.NextCallFrame.concat(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.PrevCallFrame);
256 section.addRelatedKeys(nextAndPrevFrameKeys, WebInspector.UIString("Next/previous call frame"));
258 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.EvaluateSelectionInConsole, WebInspector.UIString("Evaluate selection in console"));
259 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.AddSelectionToWatch, WebInspector.UIString("Add selection to watch"));
260 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.ToggleBreakpoint, WebInspector.UIString("Toggle breakpoint"));
262 // Editing
263 section = WebInspector.shortcutsScreen.section(WebInspector.UIString("Text Editor"));
264 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GoToMember, WebInspector.UIString("Go to member"));
265 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.ToggleAutocompletion, WebInspector.UIString("Autocompletion"));
266 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GoToLine, WebInspector.UIString("Go to line"));
267 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.JumpToPreviousLocation, WebInspector.UIString("Jump to previous editing location"));
268 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.JumpToNextLocation, WebInspector.UIString("Jump to next editing location"));
269 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.ToggleComment, WebInspector.UIString("Toggle comment"));
270 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByOne, WebInspector.UIString("Increment CSS unit by 1"));
271 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByOne, WebInspector.UIString("Decrement CSS unit by 1"));
272 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByTen, WebInspector.UIString("Increment CSS unit by 10"));
273 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByTen, WebInspector.UIString("Decrement CSS unit by 10"));
274 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.SelectNextOccurrence, WebInspector.UIString("Select next occurrence"));
275 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.SoftUndo, WebInspector.UIString("Soft undo"));
276 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GotoMatchingBracket, WebInspector.UIString("Go to matching bracket"));
277 section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.CloseEditorTab, WebInspector.UIString("Close editor tab"));
278 section.addAlternateKeys(WebInspector.shortcutRegistry.shortcutDescriptorsForAction("sources.switch-file"), WebInspector.UIString("Switch between files with the same name and different extensions."));
280 // Timeline panel
281 section = WebInspector.shortcutsScreen.section(WebInspector.UIString("Timeline Panel"));
282 section.addAlternateKeys(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.StartStopRecording, WebInspector.UIString("Start/stop recording"));
283 section.addAlternateKeys(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.RecordPageReload, WebInspector.UIString("Record page reload"));
284 section.addAlternateKeys(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.SaveToFile, WebInspector.UIString("Save timeline data"));
285 section.addAlternateKeys(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.LoadFromFile, WebInspector.UIString("Load timeline data"));
286 section.addRelatedKeys(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.JumpToPreviousFrame.concat(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.JumpToNextFrame), WebInspector.UIString("Jump to previous/next frame"));
289 // Profiles panel
290 section = WebInspector.shortcutsScreen.section(WebInspector.UIString("Profiles Panel"));
291 section.addAlternateKeys(WebInspector.ShortcutsScreen.ProfilesPanelShortcuts.StartStopRecording, WebInspector.UIString("Start/stop recording"));
293 // Layers panel
294 if (Runtime.experiments.isEnabled("layersPanel")) {
295 section = WebInspector.shortcutsScreen.section(WebInspector.UIString("Layers Panel"));
296 section.addAlternateKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.ResetView, WebInspector.UIString("Reset view"));
297 section.addAlternateKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.PanMode, WebInspector.UIString("Switch to pan mode"));
298 section.addAlternateKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.RotateMode, WebInspector.UIString("Switch to rotate mode"));
299 section.addAlternateKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.TogglePanRotate, WebInspector.UIString("Temporarily toggle pan/rotate mode while held"));
300 section.addAlternateKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.ZoomIn, WebInspector.UIString("Zoom in"));
301 section.addAlternateKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.ZoomOut, WebInspector.UIString("Zoom out"));
302 section.addRelatedKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.Up.concat(WebInspector.ShortcutsScreen.LayersPanelShortcuts.Down), WebInspector.UIString("Pan or rotate up/down"));
303 section.addRelatedKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.Left.concat(WebInspector.ShortcutsScreen.LayersPanelShortcuts.Right), WebInspector.UIString("Pan or rotate left/right"));
307 WebInspector.ShortcutsScreen.ElementsPanelShortcuts = {
308 NavigateUp: [
309 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Up)
312 NavigateDown: [
313 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Down)
316 Expand: [
317 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Right)
320 Collapse: [
321 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Left)
324 EditAttribute: [
325 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Enter)
328 HideElement: [
329 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.H)
332 ToggleEditAsHTML: [
333 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.F2)
336 NextProperty: [
337 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Tab)
340 PreviousProperty: [
341 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Tab, WebInspector.KeyboardShortcut.Modifiers.Shift)
344 IncrementValue: [
345 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Up)
348 DecrementValue: [
349 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Down)
352 IncrementBy10: [
353 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.PageUp),
354 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Up, WebInspector.KeyboardShortcut.Modifiers.Shift)
357 DecrementBy10: [
358 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.PageDown),
359 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Down, WebInspector.KeyboardShortcut.Modifiers.Shift)
362 IncrementBy100: [
363 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.PageUp, WebInspector.KeyboardShortcut.Modifiers.Shift)
366 DecrementBy100: [
367 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.PageDown, WebInspector.KeyboardShortcut.Modifiers.Shift)
370 IncrementBy01: [
371 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Up, WebInspector.KeyboardShortcut.Modifiers.Alt)
374 DecrementBy01: [
375 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Down, WebInspector.KeyboardShortcut.Modifiers.Alt)
379 WebInspector.ShortcutsScreen.SourcesPanelShortcuts = {
380 SelectNextOccurrence: [
381 WebInspector.KeyboardShortcut.makeDescriptor("d", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
384 SoftUndo: [
385 WebInspector.KeyboardShortcut.makeDescriptor("u", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
388 GotoMatchingBracket: [
389 WebInspector.KeyboardShortcut.makeDescriptor("m", WebInspector.KeyboardShortcut.Modifiers.Ctrl)
392 ToggleAutocompletion: [
393 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Space, WebInspector.KeyboardShortcut.Modifiers.Ctrl)
396 IncreaseCSSUnitByOne: [
397 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Up, WebInspector.KeyboardShortcut.Modifiers.Alt)
400 DecreaseCSSUnitByOne: [
401 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Down, WebInspector.KeyboardShortcut.Modifiers.Alt)
404 IncreaseCSSUnitByTen: [
405 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.PageUp, WebInspector.KeyboardShortcut.Modifiers.Alt)
408 DecreaseCSSUnitByTen: [
409 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.PageDown, WebInspector.KeyboardShortcut.Modifiers.Alt)
411 EvaluateSelectionInConsole: [
412 WebInspector.KeyboardShortcut.makeDescriptor("e", WebInspector.KeyboardShortcut.Modifiers.Shift | WebInspector.KeyboardShortcut.Modifiers.Ctrl)
415 AddSelectionToWatch: [
416 WebInspector.KeyboardShortcut.makeDescriptor("a", WebInspector.KeyboardShortcut.Modifiers.Shift | WebInspector.KeyboardShortcut.Modifiers.Ctrl)
419 GoToMember: [
420 WebInspector.KeyboardShortcut.makeDescriptor("p", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta | WebInspector.KeyboardShortcut.Modifiers.Shift)
423 GoToLine: [
424 WebInspector.KeyboardShortcut.makeDescriptor("g", WebInspector.KeyboardShortcut.Modifiers.Ctrl)
427 ToggleBreakpoint: [
428 WebInspector.KeyboardShortcut.makeDescriptor("b", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
431 NextCallFrame: [
432 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Period, WebInspector.KeyboardShortcut.Modifiers.Ctrl)
435 PrevCallFrame: [
436 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Comma, WebInspector.KeyboardShortcut.Modifiers.Ctrl)
439 ToggleComment: [
440 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Slash, WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
443 JumpToPreviousLocation: [
444 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Minus, WebInspector.KeyboardShortcut.Modifiers.Alt)
447 JumpToNextLocation: [
448 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Plus, WebInspector.KeyboardShortcut.Modifiers.Alt)
451 CloseEditorTab: [
452 WebInspector.KeyboardShortcut.makeDescriptor("w", WebInspector.KeyboardShortcut.Modifiers.Alt)
455 Save: [
456 WebInspector.KeyboardShortcut.makeDescriptor("s", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
459 SaveAll: [
460 WebInspector.KeyboardShortcut.makeDescriptor("s", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta | WebInspector.KeyboardShortcut.Modifiers.ShiftOrOption)
464 WebInspector.ShortcutsScreen.TimelinePanelShortcuts = {
465 StartStopRecording: [
466 WebInspector.KeyboardShortcut.makeDescriptor("e", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
469 RecordPageReload: [
470 WebInspector.KeyboardShortcut.makeDescriptor("r", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
473 SaveToFile: [
474 WebInspector.KeyboardShortcut.makeDescriptor("s", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
477 LoadFromFile: [
478 WebInspector.KeyboardShortcut.makeDescriptor("o", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
481 JumpToPreviousFrame: [
482 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.LeftSquareBracket)
485 JumpToNextFrame: [
486 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.RightSquareBracket)
490 WebInspector.ShortcutsScreen.ProfilesPanelShortcuts = {
491 StartStopRecording: [
492 WebInspector.KeyboardShortcut.makeDescriptor("e", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
496 WebInspector.ShortcutsScreen.LayersPanelShortcuts = {
497 ResetView: [
498 WebInspector.KeyboardShortcut.makeDescriptor("0")
501 PanMode: [
502 WebInspector.KeyboardShortcut.makeDescriptor("x")
505 RotateMode: [
506 WebInspector.KeyboardShortcut.makeDescriptor("v")
509 TogglePanRotate: [
510 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Shift)
513 ZoomIn: [
514 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Plus, WebInspector.KeyboardShortcut.Modifiers.Shift),
515 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.NumpadPlus)
518 ZoomOut: [
519 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Minus, WebInspector.KeyboardShortcut.Modifiers.Shift),
520 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.NumpadMinus)
523 Up: [
524 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Up),
525 WebInspector.KeyboardShortcut.makeDescriptor("w")
528 Down: [
529 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Down),
530 WebInspector.KeyboardShortcut.makeDescriptor("s")
533 Left: [
534 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Left),
535 WebInspector.KeyboardShortcut.makeDescriptor("a")
538 Right: [
539 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Right),
540 WebInspector.KeyboardShortcut.makeDescriptor("d")