| OLD | NEW |
| (Empty) |
| 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 * @unrestricted | |
| 33 */ | |
| 34 Components.ShortcutsScreen = class { | |
| 35 constructor() { | |
| 36 /** @type {!Object.<string, !Components.ShortcutsSection>} */ | |
| 37 this._sections = {}; | |
| 38 } | |
| 39 | |
| 40 static registerShortcuts() { | |
| 41 // Elements panel | |
| 42 var elementsSection = Components.shortcutsScreen.section(Common.UIString('El
ements Panel')); | |
| 43 | |
| 44 var navigate = Components.ShortcutsScreen.ElementsPanelShortcuts.NavigateUp.
concat( | |
| 45 Components.ShortcutsScreen.ElementsPanelShortcuts.NavigateDown); | |
| 46 elementsSection.addRelatedKeys(navigate, Common.UIString('Navigate elements'
)); | |
| 47 | |
| 48 var expandCollapse = Components.ShortcutsScreen.ElementsPanelShortcuts.Expan
d.concat( | |
| 49 Components.ShortcutsScreen.ElementsPanelShortcuts.Collapse); | |
| 50 elementsSection.addRelatedKeys(expandCollapse, Common.UIString('Expand/colla
pse')); | |
| 51 | |
| 52 elementsSection.addAlternateKeys( | |
| 53 Components.ShortcutsScreen.ElementsPanelShortcuts.EditAttribute, Common.
UIString('Edit attribute')); | |
| 54 elementsSection.addAlternateKeys( | |
| 55 Components.ShortcutsScreen.ElementsPanelShortcuts.HideElement, Common.UI
String('Hide element')); | |
| 56 elementsSection.addAlternateKeys( | |
| 57 Components.ShortcutsScreen.ElementsPanelShortcuts.ToggleEditAsHTML, Comm
on.UIString('Toggle edit as HTML')); | |
| 58 | |
| 59 var stylesPaneSection = Components.shortcutsScreen.section(Common.UIString('
Styles Pane')); | |
| 60 | |
| 61 var nextPreviousProperty = Components.ShortcutsScreen.ElementsPanelShortcuts
.NextProperty.concat( | |
| 62 Components.ShortcutsScreen.ElementsPanelShortcuts.PreviousProperty); | |
| 63 stylesPaneSection.addRelatedKeys(nextPreviousProperty, Common.UIString('Next
/previous property')); | |
| 64 | |
| 65 stylesPaneSection.addRelatedKeys( | |
| 66 Components.ShortcutsScreen.ElementsPanelShortcuts.IncrementValue, Common
.UIString('Increment value')); | |
| 67 stylesPaneSection.addRelatedKeys( | |
| 68 Components.ShortcutsScreen.ElementsPanelShortcuts.DecrementValue, Common
.UIString('Decrement value')); | |
| 69 | |
| 70 stylesPaneSection.addAlternateKeys( | |
| 71 Components.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy10, Common.
UIString('Increment by %f', 10)); | |
| 72 stylesPaneSection.addAlternateKeys( | |
| 73 Components.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy10, Common.
UIString('Decrement by %f', 10)); | |
| 74 | |
| 75 stylesPaneSection.addAlternateKeys( | |
| 76 Components.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy100, Common
.UIString('Increment by %f', 100)); | |
| 77 stylesPaneSection.addAlternateKeys( | |
| 78 Components.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy100, Common
.UIString('Decrement by %f', 100)); | |
| 79 | |
| 80 stylesPaneSection.addAlternateKeys( | |
| 81 Components.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy01, Common.
UIString('Increment by %f', 0.1)); | |
| 82 stylesPaneSection.addAlternateKeys( | |
| 83 Components.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy01, Common.
UIString('Decrement by %f', 0.1)); | |
| 84 | |
| 85 // Debugger | |
| 86 var section = Components.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'), C
ommon.UIString('Step out')); | |
| 96 | |
| 97 var nextAndPrevFrameKeys = Components.ShortcutsScreen.SourcesPanelShortcuts.
NextCallFrame.concat( | |
| 98 Components.ShortcutsScreen.SourcesPanelShortcuts.PrevCallFrame); | |
| 99 section.addRelatedKeys(nextAndPrevFrameKeys, Common.UIString('Next/previous
call frame')); | |
| 100 | |
| 101 section.addAlternateKeys( | |
| 102 Components.ShortcutsScreen.SourcesPanelShortcuts.EvaluateSelectionInCons
ole, | |
| 103 Common.UIString('Evaluate selection in console')); | |
| 104 section.addAlternateKeys( | |
| 105 Components.ShortcutsScreen.SourcesPanelShortcuts.AddSelectionToWatch, | |
| 106 Common.UIString('Add selection to watch')); | |
| 107 section.addAlternateKeys( | |
| 108 Components.ShortcutsScreen.SourcesPanelShortcuts.ToggleBreakpoint, Commo
n.UIString('Toggle breakpoint')); | |
| 109 section.addAlternateKeys( | |
| 110 UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.toggle-breakp
oints-active'), | |
| 111 Common.UIString('Toggle all breakpoints')); | |
| 112 | |
| 113 // Editing | |
| 114 section = Components.shortcutsScreen.section(Common.UIString('Text Editor'))
; | |
| 115 section.addAlternateKeys( | |
| 116 Components.ShortcutsScreen.SourcesPanelShortcuts.GoToMember, Common.UISt
ring('Go to member')); | |
| 117 section.addAlternateKeys( | |
| 118 Components.ShortcutsScreen.SourcesPanelShortcuts.ToggleAutocompletion, C
ommon.UIString('Autocompletion')); | |
| 119 section.addAlternateKeys(Components.ShortcutsScreen.SourcesPanelShortcuts.Go
ToLine, Common.UIString('Go to line')); | |
| 120 section.addAlternateKeys( | |
| 121 Components.ShortcutsScreen.SourcesPanelShortcuts.JumpToPreviousLocation, | |
| 122 Common.UIString('Jump to previous editing location')); | |
| 123 section.addAlternateKeys( | |
| 124 Components.ShortcutsScreen.SourcesPanelShortcuts.JumpToNextLocation, | |
| 125 Common.UIString('Jump to next editing location')); | |
| 126 section.addAlternateKeys( | |
| 127 Components.ShortcutsScreen.SourcesPanelShortcuts.ToggleComment, Common.U
IString('Toggle comment')); | |
| 128 section.addAlternateKeys( | |
| 129 Components.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByOne, | |
| 130 Common.UIString('Increment CSS unit by 1')); | |
| 131 section.addAlternateKeys( | |
| 132 Components.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByOne, | |
| 133 Common.UIString('Decrement CSS unit by 1')); | |
| 134 section.addAlternateKeys( | |
| 135 Components.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByTen, | |
| 136 Common.UIString('Increment CSS unit by 10')); | |
| 137 section.addAlternateKeys( | |
| 138 Components.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByTen, | |
| 139 Common.UIString('Decrement CSS unit by 10')); | |
| 140 section.addAlternateKeys( | |
| 141 Components.ShortcutsScreen.SourcesPanelShortcuts.SelectNextOccurrence, | |
| 142 Common.UIString('Select next occurrence')); | |
| 143 section.addAlternateKeys(Components.ShortcutsScreen.SourcesPanelShortcuts.So
ftUndo, Common.UIString('Soft undo')); | |
| 144 section.addAlternateKeys( | |
| 145 Components.ShortcutsScreen.SourcesPanelShortcuts.GotoMatchingBracket, | |
| 146 Common.UIString('Go to matching bracket')); | |
| 147 section.addAlternateKeys( | |
| 148 Components.ShortcutsScreen.SourcesPanelShortcuts.CloseEditorTab, Common.
UIString('Close editor tab')); | |
| 149 section.addAlternateKeys( | |
| 150 UI.shortcutRegistry.shortcutDescriptorsForAction('sources.switch-file'), | |
| 151 Common.UIString('Switch between files with the same name and different e
xtensions.')); | |
| 152 | |
| 153 // Timeline panel | |
| 154 section = Components.shortcutsScreen.section(Common.UIString('Timeline Panel
')); | |
| 155 section.addAlternateKeys( | |
| 156 UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.toggle-record
ing'), | |
| 157 Common.UIString('Start/stop recording')); | |
| 158 section.addAlternateKeys( | |
| 159 UI.shortcutRegistry.shortcutDescriptorsForAction('main.reload'), 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-fil
e'), Common.UIString('Load profile')); | |
| 164 section.addRelatedKeys( | |
| 165 UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.jump-to-previ
ous-frame') | |
| 166 .concat(UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.j
ump-to-next-frame')), | |
| 167 Common.UIString('Jump to previous/next frame')); | |
| 168 | |
| 169 // Profiles panel | |
| 170 section = Components.shortcutsScreen.section(Common.UIString('Profiles Panel
')); | |
| 171 section.addAlternateKeys( | |
| 172 UI.shortcutRegistry.shortcutDescriptorsForAction('profiler.toggle-record
ing'), | |
| 173 Common.UIString('Start/stop recording')); | |
| 174 | |
| 175 // Layers panel | |
| 176 section = Components.shortcutsScreen.section(Common.UIString('Layers Panel')
); | |
| 177 section.addAlternateKeys(Components.ShortcutsScreen.LayersPanelShortcuts.Res
etView, Common.UIString('Reset view')); | |
| 178 section.addAlternateKeys( | |
| 179 Components.ShortcutsScreen.LayersPanelShortcuts.PanMode, Common.UIString
('Switch to pan mode')); | |
| 180 section.addAlternateKeys( | |
| 181 Components.ShortcutsScreen.LayersPanelShortcuts.RotateMode, Common.UIStr
ing('Switch to rotate mode')); | |
| 182 section.addAlternateKeys( | |
| 183 Components.ShortcutsScreen.LayersPanelShortcuts.TogglePanRotate, | |
| 184 Common.UIString('Temporarily toggle pan/rotate mode while held')); | |
| 185 section.addAlternateKeys(Components.ShortcutsScreen.LayersPanelShortcuts.Zoo
mIn, Common.UIString('Zoom in')); | |
| 186 section.addAlternateKeys(Components.ShortcutsScreen.LayersPanelShortcuts.Zoo
mOut, Common.UIString('Zoom out')); | |
| 187 section.addRelatedKeys( | |
| 188 Components.ShortcutsScreen.LayersPanelShortcuts.Up.concat(Components.Sho
rtcutsScreen.LayersPanelShortcuts.Down), | |
| 189 Common.UIString('Pan or rotate up/down')); | |
| 190 section.addRelatedKeys( | |
| 191 Components.ShortcutsScreen.LayersPanelShortcuts.Left.concat( | |
| 192 Components.ShortcutsScreen.LayersPanelShortcuts.Right), | |
| 193 Common.UIString('Pan or rotate left/right')); | |
| 194 } | |
| 195 | |
| 196 /** | |
| 197 * @param {string} name | |
| 198 * @return {!Components.ShortcutsSection} | |
| 199 */ | |
| 200 section(name) { | |
| 201 var section = this._sections[name]; | |
| 202 if (!section) | |
| 203 this._sections[name] = section = new Components.ShortcutsSection(name); | |
| 204 return section; | |
| 205 } | |
| 206 | |
| 207 /** | |
| 208 * @return {!UI.Widget} | |
| 209 */ | |
| 210 createShortcutsTabView() { | |
| 211 var orderedSections = []; | |
| 212 for (var section in this._sections) | |
| 213 orderedSections.push(this._sections[section]); | |
| 214 function compareSections(a, b) { | |
| 215 return a.order - b.order; | |
| 216 } | |
| 217 orderedSections.sort(compareSections); | |
| 218 | |
| 219 var widget = new UI.Widget(); | |
| 220 | |
| 221 widget.element.className = 'settings-tab-container'; // Override | |
| 222 widget.element.createChild('header').createChild('h3').createTextChild(Commo
n.UIString('Shortcuts')); | |
| 223 var scrollPane = widget.element.createChild('div', 'help-container-wrapper')
; | |
| 224 var container = scrollPane.createChild('div'); | |
| 225 container.className = 'help-content help-container'; | |
| 226 for (var i = 0; i < orderedSections.length; ++i) | |
| 227 orderedSections[i].renderSection(container); | |
| 228 | |
| 229 var note = scrollPane.createChild('p', 'help-footnote'); | |
| 230 note.appendChild(UI.createDocumentationLink( | |
| 231 'iterate/inspect-styles/shortcuts', Common.UIString('Full list of DevToo
ls keyboard shortcuts and gestures'))); | |
| 232 | |
| 233 return widget; | |
| 234 } | |
| 235 }; | |
| 236 | |
| 237 /** | |
| 238 * We cannot initialize it here as localized strings are not loaded yet. | |
| 239 * @type {!Components.ShortcutsScreen} | |
| 240 */ | |
| 241 Components.shortcutsScreen; | |
| 242 | |
| 243 /** | |
| 244 * @unrestricted | |
| 245 */ | |
| 246 Components.ShortcutsSection = class { | |
| 247 /** | |
| 248 * @param {string} name | |
| 249 */ | |
| 250 constructor(name) { | |
| 251 this.name = name; | |
| 252 this._lines = /** @type {!Array.<!{key: !Node, text: string}>} */ ([]); | |
| 253 this.order = ++Components.ShortcutsSection._sequenceNumber; | |
| 254 } | |
| 255 | |
| 256 /** | |
| 257 * @param {!UI.KeyboardShortcut.Descriptor} key | |
| 258 * @param {string} description | |
| 259 */ | |
| 260 addKey(key, description) { | |
| 261 this._addLine(this._renderKey(key), description); | |
| 262 } | |
| 263 | |
| 264 /** | |
| 265 * @param {!Array.<!UI.KeyboardShortcut.Descriptor>} keys | |
| 266 * @param {string} description | |
| 267 */ | |
| 268 addRelatedKeys(keys, description) { | |
| 269 this._addLine(this._renderSequence(keys, '/'), description); | |
| 270 } | |
| 271 | |
| 272 /** | |
| 273 * @param {!Array.<!UI.KeyboardShortcut.Descriptor>} keys | |
| 274 * @param {string} description | |
| 275 */ | |
| 276 addAlternateKeys(keys, description) { | |
| 277 this._addLine(this._renderSequence(keys, Common.UIString('or')), description
); | |
| 278 } | |
| 279 | |
| 280 /** | |
| 281 * @param {!Node} keyElement | |
| 282 * @param {string} description | |
| 283 */ | |
| 284 _addLine(keyElement, description) { | |
| 285 this._lines.push({key: keyElement, text: description}); | |
| 286 } | |
| 287 | |
| 288 /** | |
| 289 * @param {!Element} container | |
| 290 */ | |
| 291 renderSection(container) { | |
| 292 var parent = container.createChild('div', 'help-block'); | |
| 293 | |
| 294 var headLine = parent.createChild('div', 'help-line'); | |
| 295 headLine.createChild('div', 'help-key-cell'); | |
| 296 headLine.createChild('div', 'help-section-title help-cell').textContent = th
is.name; | |
| 297 | |
| 298 for (var i = 0; i < this._lines.length; ++i) { | |
| 299 var line = parent.createChild('div', 'help-line'); | |
| 300 var keyCell = line.createChild('div', 'help-key-cell'); | |
| 301 keyCell.appendChild(this._lines[i].key); | |
| 302 keyCell.appendChild(this._createSpan('help-key-delimiter', ':')); | |
| 303 line.createChild('div', 'help-cell').textContent = this._lines[i].text; | |
| 304 } | |
| 305 } | |
| 306 | |
| 307 /** | |
| 308 * @param {!Array.<!UI.KeyboardShortcut.Descriptor>} sequence | |
| 309 * @param {string} delimiter | |
| 310 * @return {!Node} | |
| 311 */ | |
| 312 _renderSequence(sequence, delimiter) { | |
| 313 var delimiterSpan = this._createSpan('help-key-delimiter', delimiter); | |
| 314 return this._joinNodes(sequence.map(this._renderKey.bind(this)), delimiterSp
an); | |
| 315 } | |
| 316 | |
| 317 /** | |
| 318 * @param {!UI.KeyboardShortcut.Descriptor} key | |
| 319 * @return {!Node} | |
| 320 */ | |
| 321 _renderKey(key) { | |
| 322 var keyName = key.name; | |
| 323 var plus = this._createSpan('help-combine-keys', '+'); | |
| 324 return this._joinNodes(keyName.split(' + ').map(this._createSpan.bind(this,
'help-key')), plus); | |
| 325 } | |
| 326 | |
| 327 /** | |
| 328 * @param {string} className | |
| 329 * @param {string} textContent | |
| 330 * @return {!Element} | |
| 331 */ | |
| 332 _createSpan(className, textContent) { | |
| 333 var node = createElement('span'); | |
| 334 node.className = className; | |
| 335 node.textContent = textContent; | |
| 336 return node; | |
| 337 } | |
| 338 | |
| 339 /** | |
| 340 * @param {!Array.<!Element>} nodes | |
| 341 * @param {!Element} delimiter | |
| 342 * @return {!Node} | |
| 343 */ | |
| 344 _joinNodes(nodes, delimiter) { | |
| 345 var result = createDocumentFragment(); | |
| 346 for (var i = 0; i < nodes.length; ++i) { | |
| 347 if (i > 0) | |
| 348 result.appendChild(delimiter.cloneNode(true)); | |
| 349 result.appendChild(nodes[i]); | |
| 350 } | |
| 351 return result; | |
| 352 } | |
| 353 }; | |
| 354 | |
| 355 Components.ShortcutsSection._sequenceNumber = 0; | |
| 356 | |
| 357 | |
| 358 Components.ShortcutsScreen.ElementsPanelShortcuts = { | |
| 359 NavigateUp: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up)], | |
| 360 | |
| 361 NavigateDown: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Dow
n)], | |
| 362 | |
| 363 Expand: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Right)], | |
| 364 | |
| 365 Collapse: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Left)], | |
| 366 | |
| 367 EditAttribute: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.En
ter)], | |
| 368 | |
| 369 HideElement: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.H)], | |
| 370 | |
| 371 ToggleEditAsHTML: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys
.F2)], | |
| 372 | |
| 373 NextProperty: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Tab
)], | |
| 374 | |
| 375 PreviousProperty: | |
| 376 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Tab, UI.Keybo
ardShortcut.Modifiers.Shift)], | |
| 377 | |
| 378 IncrementValue: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.U
p)], | |
| 379 | |
| 380 DecrementValue: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.D
own)], | |
| 381 | |
| 382 IncrementBy10: [ | |
| 383 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageUp), | |
| 384 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up, UI.KeyboardS
hortcut.Modifiers.Shift) | |
| 385 ], | |
| 386 | |
| 387 DecrementBy10: [ | |
| 388 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageDown), | |
| 389 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Down, UI.Keyboar
dShortcut.Modifiers.Shift) | |
| 390 ], | |
| 391 | |
| 392 IncrementBy100: | |
| 393 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageUp, UI.Ke
yboardShortcut.Modifiers.Shift)], | |
| 394 | |
| 395 DecrementBy100: | |
| 396 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageDown, UI.
KeyboardShortcut.Modifiers.Shift)], | |
| 397 | |
| 398 IncrementBy01: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up
, UI.KeyboardShortcut.Modifiers.Alt)], | |
| 399 | |
| 400 DecrementBy01: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Do
wn, UI.KeyboardShortcut.Modifiers.Alt)] | |
| 401 }; | |
| 402 | |
| 403 Components.ShortcutsScreen.SourcesPanelShortcuts = { | |
| 404 SelectNextOccurrence: [UI.KeyboardShortcut.makeDescriptor('d', UI.KeyboardShor
tcut.Modifiers.CtrlOrMeta)], | |
| 405 | |
| 406 SoftUndo: [UI.KeyboardShortcut.makeDescriptor('u', UI.KeyboardShortcut.Modifie
rs.CtrlOrMeta)], | |
| 407 | |
| 408 GotoMatchingBracket: [UI.KeyboardShortcut.makeDescriptor('m', UI.KeyboardShort
cut.Modifiers.Ctrl)], | |
| 409 | |
| 410 ToggleAutocompletion: | |
| 411 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Space, UI.Key
boardShortcut.Modifiers.Ctrl)], | |
| 412 | |
| 413 IncreaseCSSUnitByOne: | |
| 414 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up, UI.Keyboa
rdShortcut.Modifiers.Alt)], | |
| 415 | |
| 416 DecreaseCSSUnitByOne: | |
| 417 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Down, UI.Keyb
oardShortcut.Modifiers.Alt)], | |
| 418 | |
| 419 IncreaseCSSUnitByTen: | |
| 420 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageUp, UI.Ke
yboardShortcut.Modifiers.Alt)], | |
| 421 | |
| 422 DecreaseCSSUnitByTen: | |
| 423 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageDown, UI.
KeyboardShortcut.Modifiers.Alt)], | |
| 424 EvaluateSelectionInConsole: [UI.KeyboardShortcut.makeDescriptor( | |
| 425 'e', UI.KeyboardShortcut.Modifiers.Shift | UI.KeyboardShortcut.Modifiers.C
trl)], | |
| 426 | |
| 427 AddSelectionToWatch: [UI.KeyboardShortcut.makeDescriptor( | |
| 428 'a', UI.KeyboardShortcut.Modifiers.Shift | UI.KeyboardShortcut.Modifiers.C
trl)], | |
| 429 | |
| 430 GoToMember: [UI.KeyboardShortcut.makeDescriptor( | |
| 431 'o', UI.KeyboardShortcut.Modifiers.CtrlOrMeta | UI.KeyboardShortcut.Modifi
ers.Shift)], | |
| 432 | |
| 433 GoToLine: [UI.KeyboardShortcut.makeDescriptor('g', UI.KeyboardShortcut.Modifie
rs.Ctrl)], | |
| 434 | |
| 435 ToggleBreakpoint: [UI.KeyboardShortcut.makeDescriptor('b', UI.KeyboardShortcut
.Modifiers.CtrlOrMeta)], | |
| 436 | |
| 437 NextCallFrame: | |
| 438 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Period, UI.Ke
yboardShortcut.Modifiers.Ctrl)], | |
| 439 | |
| 440 PrevCallFrame: | |
| 441 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Comma, UI.Key
boardShortcut.Modifiers.Ctrl)], | |
| 442 | |
| 443 ToggleComment: | |
| 444 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Slash, UI.Key
boardShortcut.Modifiers.CtrlOrMeta)], | |
| 445 | |
| 446 JumpToPreviousLocation: | |
| 447 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Minus, UI.Key
boardShortcut.Modifiers.Alt)], | |
| 448 | |
| 449 JumpToNextLocation: | |
| 450 [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Plus, UI.Keyb
oardShortcut.Modifiers.Alt)], | |
| 451 | |
| 452 CloseEditorTab: [UI.KeyboardShortcut.makeDescriptor('w', UI.KeyboardShortcut.M
odifiers.Alt)], | |
| 453 | |
| 454 Save: [UI.KeyboardShortcut.makeDescriptor('s', UI.KeyboardShortcut.Modifiers.C
trlOrMeta)], | |
| 455 | |
| 456 SaveAll: [UI.KeyboardShortcut.makeDescriptor( | |
| 457 's', UI.KeyboardShortcut.Modifiers.CtrlOrMeta | UI.KeyboardShortcut.Modifi
ers.ShiftOrOption)], | |
| 458 }; | |
| 459 | |
| 460 Components.ShortcutsScreen.LayersPanelShortcuts = { | |
| 461 ResetView: [UI.KeyboardShortcut.makeDescriptor('0')], | |
| 462 | |
| 463 PanMode: [UI.KeyboardShortcut.makeDescriptor('x')], | |
| 464 | |
| 465 RotateMode: [UI.KeyboardShortcut.makeDescriptor('v')], | |
| 466 | |
| 467 TogglePanRotate: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.
Shift)], | |
| 468 | |
| 469 ZoomIn: [ | |
| 470 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Plus, UI.Keyboar
dShortcut.Modifiers.Shift), | |
| 471 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.NumpadPlus) | |
| 472 ], | |
| 473 | |
| 474 ZoomOut: [ | |
| 475 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Minus, UI.Keyboa
rdShortcut.Modifiers.Shift), | |
| 476 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.NumpadMinus) | |
| 477 ], | |
| 478 | |
| 479 Up: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up), UI.Keybo
ardShortcut.makeDescriptor('w')], | |
| 480 | |
| 481 Down: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Down), UI.K
eyboardShortcut.makeDescriptor('s')], | |
| 482 | |
| 483 Left: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Left), UI.K
eyboardShortcut.makeDescriptor('a')], | |
| 484 | |
| 485 Right: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Right), UI
.KeyboardShortcut.makeDescriptor('d')] | |
| 486 }; | |
| OLD | NEW |