Home | History | Annotate | Download | only in components
      1 /*
      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  * @constructor
     33  */
     34 WebInspector.ShortcutsScreen = function()
     35 {
     36     /** @type {!Object.<string, !WebInspector.ShortcutsSection>} */
     37     this._sections = {};
     38 }
     39 
     40 WebInspector.ShortcutsScreen.prototype = {
     41     /**
     42      * @param {string} name
     43      * @return {!WebInspector.ShortcutsSection}
     44      */
     45     section: function(name)
     46     {
     47         var section = this._sections[name];
     48         if (!section)
     49             this._sections[name] = section = new WebInspector.ShortcutsSection(name);
     50         return section;
     51     },
     52 
     53     /**
     54      * @return {!WebInspector.View}
     55      */
     56     createShortcutsTabView: function()
     57     {
     58         var orderedSections = [];
     59         for (var section in this._sections)
     60             orderedSections.push(this._sections[section]);
     61         function compareSections(a, b)
     62         {
     63             return a.order - b.order;
     64         }
     65         orderedSections.sort(compareSections);
     66 
     67         var view = new WebInspector.View();
     68 
     69         view.element.className = "settings-tab-container"; // Override
     70         view.element.createChild("header").createChild("h3").appendChild(document.createTextNode(WebInspector.UIString("Shortcuts")));
     71         var scrollPane = view.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);
     76 
     77         var note = scrollPane.createChild("p", "help-footnote");
     78         var noteLink = note.createChild("a");
     79         noteLink.href = "https://developers.google.com/chrome-developer-tools/docs/shortcuts";
     80         noteLink.target = "_blank";
     81         noteLink.createTextChild(WebInspector.UIString("Full list of keyboard shortcuts and gestures"));
     82 
     83         return view;
     84     }
     85 }
     86 
     87 /**
     88  * We cannot initialize it here as localized strings are not loaded yet.
     89  * @type {!WebInspector.ShortcutsScreen}
     90  */
     91 WebInspector.shortcutsScreen;
     92 
     93 /**
     94  * @constructor
     95  * @param {string} name
     96  */
     97 WebInspector.ShortcutsSection = function(name)
     98 {
     99     this.name = name;
    100     this._lines = /** @type {!Array.<!{key: !Node, text: string}>} */ ([]);
    101     this.order = ++WebInspector.ShortcutsSection._sequenceNumber;
    102 };
    103 
    104 WebInspector.ShortcutsSection._sequenceNumber = 0;
    105 
    106 WebInspector.ShortcutsSection.prototype = {
    107     /**
    108      * @param {!WebInspector.KeyboardShortcut.Descriptor} key
    109      * @param {string} description
    110      */
    111     addKey: function(key, description)
    112     {
    113         this._addLine(this._renderKey(key), description);
    114     },
    115 
    116     /**
    117      * @param {!Array.<!WebInspector.KeyboardShortcut.Descriptor>} keys
    118      * @param {string} description
    119      */
    120     addRelatedKeys: function(keys, description)
    121     {
    122         this._addLine(this._renderSequence(keys, "/"), description);
    123     },
    124 
    125     /**
    126      * @param {!Array.<!WebInspector.KeyboardShortcut.Descriptor>} keys
    127      * @param {string} description
    128      */
    129     addAlternateKeys: function(keys, description)
    130     {
    131         this._addLine(this._renderSequence(keys, WebInspector.UIString("or")), description);
    132     },
    133 
    134     /**
    135      * @param {!Node} keyElement
    136      * @param {string} description
    137      */
    138     _addLine: function(keyElement, description)
    139     {
    140         this._lines.push({ key: keyElement, text: description })
    141     },
    142 
    143     /**
    144      * @param {!Element} container
    145      */
    146     renderSection: function(container)
    147     {
    148         var parent = container.createChild("div", "help-block");
    149 
    150         var headLine = parent.createChild("div", "help-line");
    151         headLine.createChild("div", "help-key-cell");
    152         headLine.createChild("div", "help-section-title help-cell").textContent = this.name;
    153 
    154         for (var i = 0; i < this._lines.length; ++i) {
    155             var line = parent.createChild("div", "help-line");
    156             var keyCell = line.createChild("div", "help-key-cell");
    157             keyCell.appendChild(this._lines[i].key);
    158             keyCell.appendChild(this._createSpan("help-key-delimiter", ":"));
    159             line.createChild("div", "help-cell").textContent = this._lines[i].text;
    160         }
    161     },
    162 
    163     /**
    164      * @param {!Array.<!WebInspector.KeyboardShortcut.Descriptor>} sequence
    165      * @param {string} delimiter
    166      * @return {!Node}
    167      */
    168     _renderSequence: function(sequence, delimiter)
    169     {
    170         var delimiterSpan = this._createSpan("help-key-delimiter", delimiter);
    171         return this._joinNodes(sequence.map(this._renderKey.bind(this)), delimiterSpan);
    172     },
    173 
    174     /**
    175      * @param {!WebInspector.KeyboardShortcut.Descriptor} key
    176      * @return {!Node}
    177      */
    178     _renderKey: function(key)
    179     {
    180         var keyName = key.name;
    181         var plus = this._createSpan("help-combine-keys", "+");
    182         return this._joinNodes(keyName.split(" + ").map(this._createSpan.bind(this, "help-key")), plus);
    183     },
    184 
    185     /**
    186      * @param {string} className
    187      * @param {string} textContent
    188      * @return {!Element}
    189      */
    190     _createSpan: function(className, textContent)
    191     {
    192         var node = document.createElement("span");
    193         node.className = className;
    194         node.textContent = textContent;
    195         return node;
    196     },
    197 
    198     /**
    199      * @param {!Array.<!Element>} nodes
    200      * @param {!Element} delimiter
    201      * @return {!Node}
    202      */
    203     _joinNodes: function(nodes, delimiter)
    204     {
    205         var result = document.createDocumentFragment();
    206         for (var i = 0; i < nodes.length; ++i) {
    207             if (i > 0)
    208                 result.appendChild(delimiter.cloneNode(true));
    209             result.appendChild(nodes[i]);
    210         }
    211         return result;
    212     }
    213 }
    214 
    215 WebInspector.ShortcutsScreen.registerShortcuts = function()
    216 {
    217     // Elements panel
    218     var elementsSection = WebInspector.shortcutsScreen.section(WebInspector.UIString("Elements Panel"));
    219 
    220     var navigate = WebInspector.ShortcutsScreen.ElementsPanelShortcuts.NavigateUp.concat(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.NavigateDown);
    221     elementsSection.addRelatedKeys(navigate, WebInspector.UIString("Navigate elements"));
    222 
    223     var expandCollapse = WebInspector.ShortcutsScreen.ElementsPanelShortcuts.Expand.concat(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.Collapse);
    224     elementsSection.addRelatedKeys(expandCollapse, WebInspector.UIString("Expand/collapse"));
    225 
    226     elementsSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.EditAttribute, WebInspector.UIString("Edit attribute"));
    227     elementsSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.HideElement, WebInspector.UIString("Hide element"));
    228     elementsSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.ToggleEditAsHTML, WebInspector.UIString("Toggle edit as HTML"));
    229 
    230     var stylesPaneSection = WebInspector.shortcutsScreen.section(WebInspector.UIString("Styles Pane"));
    231 
    232     var nextPreviousProperty = WebInspector.ShortcutsScreen.ElementsPanelShortcuts.NextProperty.concat(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.PreviousProperty);
    233     stylesPaneSection.addRelatedKeys(nextPreviousProperty, WebInspector.UIString("Next/previous property"));
    234 
    235     stylesPaneSection.addRelatedKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementValue, WebInspector.UIString("Increment value"));
    236     stylesPaneSection.addRelatedKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementValue, WebInspector.UIString("Decrement value"));
    237 
    238     stylesPaneSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy10, WebInspector.UIString("Increment by %f", 10));
    239     stylesPaneSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy10, WebInspector.UIString("Decrement by %f", 10));
    240 
    241     stylesPaneSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy100, WebInspector.UIString("Increment by %f", 100));
    242     stylesPaneSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy100, WebInspector.UIString("Decrement by %f", 100));
    243 
    244     stylesPaneSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy01, WebInspector.UIString("Increment by %f", 0.1));
    245     stylesPaneSection.addAlternateKeys(WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy01, WebInspector.UIString("Decrement by %f", 0.1));
    246 
    247 
    248     // Sources panel
    249     var section = WebInspector.shortcutsScreen.section(WebInspector.UIString("Sources Panel"));
    250 
    251     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.PauseContinue, WebInspector.UIString("Pause/Continue"));
    252     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.StepOver, WebInspector.UIString("Step over"));
    253     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.StepInto, WebInspector.UIString("Step into"));
    254     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.StepOut, WebInspector.UIString("Step out"));
    255 
    256     var nextAndPrevFrameKeys = WebInspector.ShortcutsScreen.SourcesPanelShortcuts.NextCallFrame.concat(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.PrevCallFrame);
    257     section.addRelatedKeys(nextAndPrevFrameKeys, WebInspector.UIString("Next/previous call frame"));
    258 
    259     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.EvaluateSelectionInConsole, WebInspector.UIString("Evaluate selection in console"));
    260     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.AddSelectionToWatch, WebInspector.UIString("Add selection to watch"));
    261     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GoToMember, WebInspector.UIString("Go to member"));
    262     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GoToLine, WebInspector.UIString("Go to line"));
    263     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.ToggleBreakpoint, WebInspector.UIString("Toggle breakpoint"));
    264     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.ToggleComment, WebInspector.UIString("Toggle comment"));
    265     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.CloseEditorTab, WebInspector.UIString("Close editor tab"));
    266     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByOne, WebInspector.UIString("Increment CSS unit by 1"));
    267     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByOne, WebInspector.UIString("Decrement CSS unit by 1"));
    268     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByTen, WebInspector.UIString("Increment CSS unit by 10"));
    269     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByTen, WebInspector.UIString("Decrement CSS unit by 10"));
    270     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.JumpToPreviousLocation, WebInspector.UIString("Jump to previous editing location"));
    271     section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.JumpToNextLocation, WebInspector.UIString("Jump to next editing location"));
    272 
    273     // Timeline panel
    274     section = WebInspector.shortcutsScreen.section(WebInspector.UIString("Timeline Panel"));
    275     section.addAlternateKeys(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.StartStopRecording, WebInspector.UIString("Start/stop recording"));
    276     section.addAlternateKeys(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.SaveToFile, WebInspector.UIString("Save timeline data"));
    277     section.addAlternateKeys(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.LoadFromFile, WebInspector.UIString("Load timeline data"));
    278 
    279 
    280     // Profiles panel
    281     section = WebInspector.shortcutsScreen.section(WebInspector.UIString("Profiles Panel"));
    282     section.addAlternateKeys(WebInspector.ShortcutsScreen.ProfilesPanelShortcuts.StartStopRecording, WebInspector.UIString("Start/stop recording"));
    283 
    284     // Layers panel
    285     if (WebInspector.experimentsSettings.isEnabled("layersPanel")) {
    286         section = WebInspector.shortcutsScreen.section(WebInspector.UIString("Layers Panel"));
    287         section.addAlternateKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.ResetView, WebInspector.UIString("Reset view"));
    288         section.addAlternateKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.ZoomIn, WebInspector.UIString("Zoom in"));
    289         section.addAlternateKeys(WebInspector.ShortcutsScreen.LayersPanelShortcuts.ZoomOut, WebInspector.UIString("Zoom out"));
    290         var PanUpDown = WebInspector.ShortcutsScreen.LayersPanelShortcuts.PanUp.concat(WebInspector.ShortcutsScreen.LayersPanelShortcuts.PanDown);
    291         section.addRelatedKeys(PanUpDown, WebInspector.UIString("Pan up/down"));
    292         var PanLeftRight = WebInspector.ShortcutsScreen.LayersPanelShortcuts.PanLeft.concat(WebInspector.ShortcutsScreen.LayersPanelShortcuts.PanRight);
    293         section.addRelatedKeys(PanLeftRight, WebInspector.UIString("Pan left/right"));
    294         var rotate = WebInspector.ShortcutsScreen.LayersPanelShortcuts.RotateCWX
    295             .concat(WebInspector.ShortcutsScreen.LayersPanelShortcuts.RotateCCWX)
    296             .concat(WebInspector.ShortcutsScreen.LayersPanelShortcuts.RotateCWY)
    297             .concat(WebInspector.ShortcutsScreen.LayersPanelShortcuts.RotateCCWY);
    298         section.addRelatedKeys(rotate, WebInspector.UIString("Rotate"));
    299     }
    300 }
    301 
    302 WebInspector.ShortcutsScreen.ElementsPanelShortcuts = {
    303     NavigateUp: [
    304         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Up)
    305     ],
    306 
    307     NavigateDown: [
    308         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Down)
    309     ],
    310 
    311     Expand: [
    312         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Right)
    313     ],
    314 
    315     Collapse: [
    316         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Left)
    317     ],
    318 
    319     EditAttribute: [
    320         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Enter)
    321     ],
    322 
    323     HideElement: [
    324         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.H)
    325     ],
    326 
    327     ToggleEditAsHTML: [
    328         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.F2)
    329     ],
    330 
    331     NextProperty: [
    332         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Tab)
    333     ],
    334 
    335     PreviousProperty: [
    336         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Tab, WebInspector.KeyboardShortcut.Modifiers.Shift)
    337     ],
    338 
    339     IncrementValue: [
    340         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Up)
    341     ],
    342 
    343     DecrementValue: [
    344         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Down)
    345     ],
    346 
    347     IncrementBy10: [
    348         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.PageUp),
    349         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Up, WebInspector.KeyboardShortcut.Modifiers.Shift)
    350     ],
    351 
    352     DecrementBy10: [
    353         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.PageDown),
    354         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Down, WebInspector.KeyboardShortcut.Modifiers.Shift)
    355     ],
    356 
    357     IncrementBy100: [
    358         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.PageUp, WebInspector.KeyboardShortcut.Modifiers.Shift)
    359     ],
    360 
    361     DecrementBy100: [
    362         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.PageDown, WebInspector.KeyboardShortcut.Modifiers.Shift)
    363     ],
    364 
    365     IncrementBy01: [
    366         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.PageUp, WebInspector.KeyboardShortcut.Modifiers.Alt)
    367     ],
    368 
    369     DecrementBy01: [
    370         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.PageDown, WebInspector.KeyboardShortcut.Modifiers.Alt)
    371     ]
    372 };
    373 
    374 WebInspector.ShortcutsScreen.SourcesPanelShortcuts = {
    375     IncreaseCSSUnitByOne: [
    376         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Up, WebInspector.KeyboardShortcut.Modifiers.Alt)
    377     ],
    378 
    379     DecreaseCSSUnitByOne: [
    380         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Down, WebInspector.KeyboardShortcut.Modifiers.Alt)
    381     ],
    382 
    383     IncreaseCSSUnitByTen: [
    384         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.PageUp, WebInspector.KeyboardShortcut.Modifiers.Alt)
    385     ],
    386 
    387     DecreaseCSSUnitByTen: [
    388         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.PageDown, WebInspector.KeyboardShortcut.Modifiers.Alt)
    389     ],
    390 
    391     RunSnippet: [
    392         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Enter, WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
    393     ],
    394 
    395     PauseContinue: [
    396         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.F8),
    397         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Backslash, WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
    398     ],
    399 
    400     StepOver: [
    401         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.F10),
    402         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.SingleQuote, WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
    403     ],
    404 
    405     StepInto: [
    406         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.F11),
    407         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Semicolon, WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
    408     ],
    409 
    410     StepOut: [
    411         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.F11, WebInspector.KeyboardShortcut.Modifiers.Shift),
    412         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Semicolon, WebInspector.KeyboardShortcut.Modifiers.Shift | WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
    413     ],
    414 
    415     EvaluateSelectionInConsole: [
    416         WebInspector.KeyboardShortcut.makeDescriptor("e", WebInspector.KeyboardShortcut.Modifiers.Shift | WebInspector.KeyboardShortcut.Modifiers.Ctrl)
    417     ],
    418 
    419     AddSelectionToWatch: [
    420         WebInspector.KeyboardShortcut.makeDescriptor("a", WebInspector.KeyboardShortcut.Modifiers.Shift | WebInspector.KeyboardShortcut.Modifiers.Ctrl)
    421     ],
    422 
    423     GoToMember: [
    424         WebInspector.KeyboardShortcut.makeDescriptor("p", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta | WebInspector.KeyboardShortcut.Modifiers.Shift)
    425     ],
    426 
    427     GoToLine: [
    428         WebInspector.KeyboardShortcut.makeDescriptor("g", WebInspector.KeyboardShortcut.Modifiers.Ctrl)
    429     ],
    430 
    431     ToggleBreakpoint: [
    432         WebInspector.KeyboardShortcut.makeDescriptor("b", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
    433     ],
    434 
    435     NextCallFrame: [
    436         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Period, WebInspector.KeyboardShortcut.Modifiers.Ctrl)
    437     ],
    438 
    439     PrevCallFrame: [
    440         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Comma, WebInspector.KeyboardShortcut.Modifiers.Ctrl)
    441     ],
    442 
    443     ToggleComment: [
    444         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Slash, WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
    445     ],
    446 
    447     JumpToPreviousLocation: [
    448         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Minus, WebInspector.KeyboardShortcut.Modifiers.Alt)
    449     ],
    450 
    451     JumpToNextLocation: [
    452         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Plus, WebInspector.KeyboardShortcut.Modifiers.Alt)
    453     ],
    454 
    455     CloseEditorTab: [
    456         WebInspector.KeyboardShortcut.makeDescriptor("w", WebInspector.KeyboardShortcut.Modifiers.Alt)
    457     ],
    458 
    459     Save: [
    460         WebInspector.KeyboardShortcut.makeDescriptor("s", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
    461     ],
    462 
    463     SaveAll: [
    464         WebInspector.KeyboardShortcut.makeDescriptor("s", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta | WebInspector.KeyboardShortcut.Modifiers.ShiftOrOption)
    465     ],
    466 };
    467 
    468 WebInspector.ShortcutsScreen.TimelinePanelShortcuts = {
    469     StartStopRecording: [
    470         WebInspector.KeyboardShortcut.makeDescriptor("e", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
    471     ],
    472 
    473     SaveToFile: [
    474         WebInspector.KeyboardShortcut.makeDescriptor("s", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
    475     ],
    476 
    477     LoadFromFile: [
    478         WebInspector.KeyboardShortcut.makeDescriptor("o", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
    479     ]
    480 };
    481 
    482 WebInspector.ShortcutsScreen.ProfilesPanelShortcuts = {
    483     StartStopRecording: [
    484         WebInspector.KeyboardShortcut.makeDescriptor("e", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
    485     ]
    486 };
    487 
    488 WebInspector.ShortcutsScreen.LayersPanelShortcuts = {
    489     ResetView: [
    490         WebInspector.KeyboardShortcut.makeDescriptor("0")
    491     ],
    492 
    493     ZoomIn: [
    494         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Plus, WebInspector.KeyboardShortcut.Modifiers.Shift),
    495         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.NumpadPlus)
    496     ],
    497 
    498     ZoomOut: [
    499         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Minus, WebInspector.KeyboardShortcut.Modifiers.Shift),
    500         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.NumpadMinus)
    501     ],
    502 
    503     PanUp: [
    504         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Up, WebInspector.KeyboardShortcut.Modifiers.Shift)
    505     ],
    506 
    507     PanDown: [
    508         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Down, WebInspector.KeyboardShortcut.Modifiers.Shift)
    509     ],
    510 
    511     PanLeft: [
    512         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Left, WebInspector.KeyboardShortcut.Modifiers.Shift)
    513     ],
    514 
    515     PanRight: [
    516         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Right, WebInspector.KeyboardShortcut.Modifiers.Shift)
    517     ],
    518 
    519     RotateCWX: [
    520         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Up),
    521     ],
    522 
    523     RotateCCWX: [
    524         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Down),
    525     ],
    526 
    527     RotateCWY: [
    528         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Left),
    529     ],
    530 
    531     RotateCCWY: [
    532         WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Right),
    533     ]
    534 }
    535