Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/ShortcutsScreen.js

Issue 2623743002: DevTools: extract modules (non-extensions) (Closed)
Patch Set: rebaseline Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/components/ShortcutsScreen.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/ShortcutsScreen.js b/third_party/WebKit/Source/devtools/front_end/components/ShortcutsScreen.js
deleted file mode 100644
index eaf42c94c9b2043de5ec5224d64addd2c3007b73..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/devtools/front_end/components/ShortcutsScreen.js
+++ /dev/null
@@ -1,486 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @unrestricted
- */
-Components.ShortcutsScreen = class {
- constructor() {
- /** @type {!Object.<string, !Components.ShortcutsSection>} */
- this._sections = {};
- }
-
- static registerShortcuts() {
- // Elements panel
- var elementsSection = Components.shortcutsScreen.section(Common.UIString('Elements Panel'));
-
- var navigate = Components.ShortcutsScreen.ElementsPanelShortcuts.NavigateUp.concat(
- Components.ShortcutsScreen.ElementsPanelShortcuts.NavigateDown);
- elementsSection.addRelatedKeys(navigate, Common.UIString('Navigate elements'));
-
- var expandCollapse = Components.ShortcutsScreen.ElementsPanelShortcuts.Expand.concat(
- Components.ShortcutsScreen.ElementsPanelShortcuts.Collapse);
- elementsSection.addRelatedKeys(expandCollapse, Common.UIString('Expand/collapse'));
-
- elementsSection.addAlternateKeys(
- Components.ShortcutsScreen.ElementsPanelShortcuts.EditAttribute, Common.UIString('Edit attribute'));
- elementsSection.addAlternateKeys(
- Components.ShortcutsScreen.ElementsPanelShortcuts.HideElement, Common.UIString('Hide element'));
- elementsSection.addAlternateKeys(
- Components.ShortcutsScreen.ElementsPanelShortcuts.ToggleEditAsHTML, Common.UIString('Toggle edit as HTML'));
-
- var stylesPaneSection = Components.shortcutsScreen.section(Common.UIString('Styles Pane'));
-
- var nextPreviousProperty = Components.ShortcutsScreen.ElementsPanelShortcuts.NextProperty.concat(
- Components.ShortcutsScreen.ElementsPanelShortcuts.PreviousProperty);
- stylesPaneSection.addRelatedKeys(nextPreviousProperty, Common.UIString('Next/previous property'));
-
- stylesPaneSection.addRelatedKeys(
- Components.ShortcutsScreen.ElementsPanelShortcuts.IncrementValue, Common.UIString('Increment value'));
- stylesPaneSection.addRelatedKeys(
- Components.ShortcutsScreen.ElementsPanelShortcuts.DecrementValue, Common.UIString('Decrement value'));
-
- stylesPaneSection.addAlternateKeys(
- Components.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy10, Common.UIString('Increment by %f', 10));
- stylesPaneSection.addAlternateKeys(
- Components.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy10, Common.UIString('Decrement by %f', 10));
-
- stylesPaneSection.addAlternateKeys(
- Components.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy100, Common.UIString('Increment by %f', 100));
- stylesPaneSection.addAlternateKeys(
- Components.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy100, Common.UIString('Decrement by %f', 100));
-
- stylesPaneSection.addAlternateKeys(
- Components.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy01, Common.UIString('Increment by %f', 0.1));
- stylesPaneSection.addAlternateKeys(
- Components.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy01, Common.UIString('Decrement by %f', 0.1));
-
- // Debugger
- var section = Components.shortcutsScreen.section(Common.UIString('Debugger'));
-
- section.addAlternateKeys(
- UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.toggle-pause'), Common.UIString('Pause/ Continue'));
- section.addAlternateKeys(
- UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.step-over'), Common.UIString('Step over'));
- section.addAlternateKeys(
- UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.step-into'), Common.UIString('Step into'));
- section.addAlternateKeys(
- UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.step-out'), Common.UIString('Step out'));
-
- var nextAndPrevFrameKeys = Components.ShortcutsScreen.SourcesPanelShortcuts.NextCallFrame.concat(
- Components.ShortcutsScreen.SourcesPanelShortcuts.PrevCallFrame);
- section.addRelatedKeys(nextAndPrevFrameKeys, Common.UIString('Next/previous call frame'));
-
- section.addAlternateKeys(
- Components.ShortcutsScreen.SourcesPanelShortcuts.EvaluateSelectionInConsole,
- Common.UIString('Evaluate selection in console'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.SourcesPanelShortcuts.AddSelectionToWatch,
- Common.UIString('Add selection to watch'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.SourcesPanelShortcuts.ToggleBreakpoint, Common.UIString('Toggle breakpoint'));
- section.addAlternateKeys(
- UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.toggle-breakpoints-active'),
- Common.UIString('Toggle all breakpoints'));
-
- // Editing
- section = Components.shortcutsScreen.section(Common.UIString('Text Editor'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.SourcesPanelShortcuts.GoToMember, Common.UIString('Go to member'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.SourcesPanelShortcuts.ToggleAutocompletion, Common.UIString('Autocompletion'));
- section.addAlternateKeys(Components.ShortcutsScreen.SourcesPanelShortcuts.GoToLine, Common.UIString('Go to line'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.SourcesPanelShortcuts.JumpToPreviousLocation,
- Common.UIString('Jump to previous editing location'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.SourcesPanelShortcuts.JumpToNextLocation,
- Common.UIString('Jump to next editing location'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.SourcesPanelShortcuts.ToggleComment, Common.UIString('Toggle comment'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByOne,
- Common.UIString('Increment CSS unit by 1'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByOne,
- Common.UIString('Decrement CSS unit by 1'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByTen,
- Common.UIString('Increment CSS unit by 10'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByTen,
- Common.UIString('Decrement CSS unit by 10'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.SourcesPanelShortcuts.SelectNextOccurrence,
- Common.UIString('Select next occurrence'));
- section.addAlternateKeys(Components.ShortcutsScreen.SourcesPanelShortcuts.SoftUndo, Common.UIString('Soft undo'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.SourcesPanelShortcuts.GotoMatchingBracket,
- Common.UIString('Go to matching bracket'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.SourcesPanelShortcuts.CloseEditorTab, Common.UIString('Close editor tab'));
- section.addAlternateKeys(
- UI.shortcutRegistry.shortcutDescriptorsForAction('sources.switch-file'),
- Common.UIString('Switch between files with the same name and different extensions.'));
-
- // Timeline panel
- section = Components.shortcutsScreen.section(Common.UIString('Timeline Panel'));
- section.addAlternateKeys(
- UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.toggle-recording'),
- Common.UIString('Start/stop recording'));
- section.addAlternateKeys(
- UI.shortcutRegistry.shortcutDescriptorsForAction('main.reload'), Common.UIString('Record page reload'));
- section.addAlternateKeys(
- UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.save-to-file'), Common.UIString('Save profile'));
- section.addAlternateKeys(
- UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.load-from-file'), Common.UIString('Load profile'));
- section.addRelatedKeys(
- UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.jump-to-previous-frame')
- .concat(UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.jump-to-next-frame')),
- Common.UIString('Jump to previous/next frame'));
-
- // Profiles panel
- section = Components.shortcutsScreen.section(Common.UIString('Profiles Panel'));
- section.addAlternateKeys(
- UI.shortcutRegistry.shortcutDescriptorsForAction('profiler.toggle-recording'),
- Common.UIString('Start/stop recording'));
-
- // Layers panel
- section = Components.shortcutsScreen.section(Common.UIString('Layers Panel'));
- section.addAlternateKeys(Components.ShortcutsScreen.LayersPanelShortcuts.ResetView, Common.UIString('Reset view'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.LayersPanelShortcuts.PanMode, Common.UIString('Switch to pan mode'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.LayersPanelShortcuts.RotateMode, Common.UIString('Switch to rotate mode'));
- section.addAlternateKeys(
- Components.ShortcutsScreen.LayersPanelShortcuts.TogglePanRotate,
- Common.UIString('Temporarily toggle pan/rotate mode while held'));
- section.addAlternateKeys(Components.ShortcutsScreen.LayersPanelShortcuts.ZoomIn, Common.UIString('Zoom in'));
- section.addAlternateKeys(Components.ShortcutsScreen.LayersPanelShortcuts.ZoomOut, Common.UIString('Zoom out'));
- section.addRelatedKeys(
- Components.ShortcutsScreen.LayersPanelShortcuts.Up.concat(Components.ShortcutsScreen.LayersPanelShortcuts.Down),
- Common.UIString('Pan or rotate up/down'));
- section.addRelatedKeys(
- Components.ShortcutsScreen.LayersPanelShortcuts.Left.concat(
- Components.ShortcutsScreen.LayersPanelShortcuts.Right),
- Common.UIString('Pan or rotate left/right'));
- }
-
- /**
- * @param {string} name
- * @return {!Components.ShortcutsSection}
- */
- section(name) {
- var section = this._sections[name];
- if (!section)
- this._sections[name] = section = new Components.ShortcutsSection(name);
- return section;
- }
-
- /**
- * @return {!UI.Widget}
- */
- createShortcutsTabView() {
- var orderedSections = [];
- for (var section in this._sections)
- orderedSections.push(this._sections[section]);
- function compareSections(a, b) {
- return a.order - b.order;
- }
- orderedSections.sort(compareSections);
-
- var widget = new UI.Widget();
-
- widget.element.className = 'settings-tab-container'; // Override
- widget.element.createChild('header').createChild('h3').createTextChild(Common.UIString('Shortcuts'));
- var scrollPane = widget.element.createChild('div', 'help-container-wrapper');
- var container = scrollPane.createChild('div');
- container.className = 'help-content help-container';
- for (var i = 0; i < orderedSections.length; ++i)
- orderedSections[i].renderSection(container);
-
- var note = scrollPane.createChild('p', 'help-footnote');
- note.appendChild(UI.createDocumentationLink(
- 'iterate/inspect-styles/shortcuts', Common.UIString('Full list of DevTools keyboard shortcuts and gestures')));
-
- return widget;
- }
-};
-
-/**
- * We cannot initialize it here as localized strings are not loaded yet.
- * @type {!Components.ShortcutsScreen}
- */
-Components.shortcutsScreen;
-
-/**
- * @unrestricted
- */
-Components.ShortcutsSection = class {
- /**
- * @param {string} name
- */
- constructor(name) {
- this.name = name;
- this._lines = /** @type {!Array.<!{key: !Node, text: string}>} */ ([]);
- this.order = ++Components.ShortcutsSection._sequenceNumber;
- }
-
- /**
- * @param {!UI.KeyboardShortcut.Descriptor} key
- * @param {string} description
- */
- addKey(key, description) {
- this._addLine(this._renderKey(key), description);
- }
-
- /**
- * @param {!Array.<!UI.KeyboardShortcut.Descriptor>} keys
- * @param {string} description
- */
- addRelatedKeys(keys, description) {
- this._addLine(this._renderSequence(keys, '/'), description);
- }
-
- /**
- * @param {!Array.<!UI.KeyboardShortcut.Descriptor>} keys
- * @param {string} description
- */
- addAlternateKeys(keys, description) {
- this._addLine(this._renderSequence(keys, Common.UIString('or')), description);
- }
-
- /**
- * @param {!Node} keyElement
- * @param {string} description
- */
- _addLine(keyElement, description) {
- this._lines.push({key: keyElement, text: description});
- }
-
- /**
- * @param {!Element} container
- */
- renderSection(container) {
- var parent = container.createChild('div', 'help-block');
-
- var headLine = parent.createChild('div', 'help-line');
- headLine.createChild('div', 'help-key-cell');
- headLine.createChild('div', 'help-section-title help-cell').textContent = this.name;
-
- for (var i = 0; i < this._lines.length; ++i) {
- var line = parent.createChild('div', 'help-line');
- var keyCell = line.createChild('div', 'help-key-cell');
- keyCell.appendChild(this._lines[i].key);
- keyCell.appendChild(this._createSpan('help-key-delimiter', ':'));
- line.createChild('div', 'help-cell').textContent = this._lines[i].text;
- }
- }
-
- /**
- * @param {!Array.<!UI.KeyboardShortcut.Descriptor>} sequence
- * @param {string} delimiter
- * @return {!Node}
- */
- _renderSequence(sequence, delimiter) {
- var delimiterSpan = this._createSpan('help-key-delimiter', delimiter);
- return this._joinNodes(sequence.map(this._renderKey.bind(this)), delimiterSpan);
- }
-
- /**
- * @param {!UI.KeyboardShortcut.Descriptor} key
- * @return {!Node}
- */
- _renderKey(key) {
- var keyName = key.name;
- var plus = this._createSpan('help-combine-keys', '+');
- return this._joinNodes(keyName.split(' + ').map(this._createSpan.bind(this, 'help-key')), plus);
- }
-
- /**
- * @param {string} className
- * @param {string} textContent
- * @return {!Element}
- */
- _createSpan(className, textContent) {
- var node = createElement('span');
- node.className = className;
- node.textContent = textContent;
- return node;
- }
-
- /**
- * @param {!Array.<!Element>} nodes
- * @param {!Element} delimiter
- * @return {!Node}
- */
- _joinNodes(nodes, delimiter) {
- var result = createDocumentFragment();
- for (var i = 0; i < nodes.length; ++i) {
- if (i > 0)
- result.appendChild(delimiter.cloneNode(true));
- result.appendChild(nodes[i]);
- }
- return result;
- }
-};
-
-Components.ShortcutsSection._sequenceNumber = 0;
-
-
-Components.ShortcutsScreen.ElementsPanelShortcuts = {
- NavigateUp: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up)],
-
- NavigateDown: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Down)],
-
- Expand: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Right)],
-
- Collapse: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Left)],
-
- EditAttribute: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Enter)],
-
- HideElement: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.H)],
-
- ToggleEditAsHTML: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.F2)],
-
- NextProperty: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Tab)],
-
- PreviousProperty:
- [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Tab, UI.KeyboardShortcut.Modifiers.Shift)],
-
- IncrementValue: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up)],
-
- DecrementValue: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Down)],
-
- IncrementBy10: [
- UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageUp),
- UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up, UI.KeyboardShortcut.Modifiers.Shift)
- ],
-
- DecrementBy10: [
- UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageDown),
- UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Down, UI.KeyboardShortcut.Modifiers.Shift)
- ],
-
- IncrementBy100:
- [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageUp, UI.KeyboardShortcut.Modifiers.Shift)],
-
- DecrementBy100:
- [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageDown, UI.KeyboardShortcut.Modifiers.Shift)],
-
- IncrementBy01: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up, UI.KeyboardShortcut.Modifiers.Alt)],
-
- DecrementBy01: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Down, UI.KeyboardShortcut.Modifiers.Alt)]
-};
-
-Components.ShortcutsScreen.SourcesPanelShortcuts = {
- SelectNextOccurrence: [UI.KeyboardShortcut.makeDescriptor('d', UI.KeyboardShortcut.Modifiers.CtrlOrMeta)],
-
- SoftUndo: [UI.KeyboardShortcut.makeDescriptor('u', UI.KeyboardShortcut.Modifiers.CtrlOrMeta)],
-
- GotoMatchingBracket: [UI.KeyboardShortcut.makeDescriptor('m', UI.KeyboardShortcut.Modifiers.Ctrl)],
-
- ToggleAutocompletion:
- [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Space, UI.KeyboardShortcut.Modifiers.Ctrl)],
-
- IncreaseCSSUnitByOne:
- [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up, UI.KeyboardShortcut.Modifiers.Alt)],
-
- DecreaseCSSUnitByOne:
- [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Down, UI.KeyboardShortcut.Modifiers.Alt)],
-
- IncreaseCSSUnitByTen:
- [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageUp, UI.KeyboardShortcut.Modifiers.Alt)],
-
- DecreaseCSSUnitByTen:
- [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageDown, UI.KeyboardShortcut.Modifiers.Alt)],
- EvaluateSelectionInConsole: [UI.KeyboardShortcut.makeDescriptor(
- 'e', UI.KeyboardShortcut.Modifiers.Shift | UI.KeyboardShortcut.Modifiers.Ctrl)],
-
- AddSelectionToWatch: [UI.KeyboardShortcut.makeDescriptor(
- 'a', UI.KeyboardShortcut.Modifiers.Shift | UI.KeyboardShortcut.Modifiers.Ctrl)],
-
- GoToMember: [UI.KeyboardShortcut.makeDescriptor(
- 'o', UI.KeyboardShortcut.Modifiers.CtrlOrMeta | UI.KeyboardShortcut.Modifiers.Shift)],
-
- GoToLine: [UI.KeyboardShortcut.makeDescriptor('g', UI.KeyboardShortcut.Modifiers.Ctrl)],
-
- ToggleBreakpoint: [UI.KeyboardShortcut.makeDescriptor('b', UI.KeyboardShortcut.Modifiers.CtrlOrMeta)],
-
- NextCallFrame:
- [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Period, UI.KeyboardShortcut.Modifiers.Ctrl)],
-
- PrevCallFrame:
- [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Comma, UI.KeyboardShortcut.Modifiers.Ctrl)],
-
- ToggleComment:
- [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Slash, UI.KeyboardShortcut.Modifiers.CtrlOrMeta)],
-
- JumpToPreviousLocation:
- [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Minus, UI.KeyboardShortcut.Modifiers.Alt)],
-
- JumpToNextLocation:
- [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Plus, UI.KeyboardShortcut.Modifiers.Alt)],
-
- CloseEditorTab: [UI.KeyboardShortcut.makeDescriptor('w', UI.KeyboardShortcut.Modifiers.Alt)],
-
- Save: [UI.KeyboardShortcut.makeDescriptor('s', UI.KeyboardShortcut.Modifiers.CtrlOrMeta)],
-
- SaveAll: [UI.KeyboardShortcut.makeDescriptor(
- 's', UI.KeyboardShortcut.Modifiers.CtrlOrMeta | UI.KeyboardShortcut.Modifiers.ShiftOrOption)],
-};
-
-Components.ShortcutsScreen.LayersPanelShortcuts = {
- ResetView: [UI.KeyboardShortcut.makeDescriptor('0')],
-
- PanMode: [UI.KeyboardShortcut.makeDescriptor('x')],
-
- RotateMode: [UI.KeyboardShortcut.makeDescriptor('v')],
-
- TogglePanRotate: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Shift)],
-
- ZoomIn: [
- UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Plus, UI.KeyboardShortcut.Modifiers.Shift),
- UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.NumpadPlus)
- ],
-
- ZoomOut: [
- UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Minus, UI.KeyboardShortcut.Modifiers.Shift),
- UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.NumpadMinus)
- ],
-
- Up: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up), UI.KeyboardShortcut.makeDescriptor('w')],
-
- Down: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Down), UI.KeyboardShortcut.makeDescriptor('s')],
-
- Left: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Left), UI.KeyboardShortcut.makeDescriptor('a')],
-
- Right: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Right), UI.KeyboardShortcut.makeDescriptor('d')]
-};

Powered by Google App Engine
This is Rietveld 408576698