| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 */ | 223 */ |
| 224 isDrawerMinimized() { | 224 isDrawerMinimized() { |
| 225 return this._drawerSplitWidget.isSidebarMinimized(); | 225 return this._drawerSplitWidget.isSidebarMinimized(); |
| 226 } | 226 } |
| 227 | 227 |
| 228 /** | 228 /** |
| 229 * @param {!Event} event | 229 * @param {!Event} event |
| 230 */ | 230 */ |
| 231 _keyDown(event) { | 231 _keyDown(event) { |
| 232 var keyboardEvent = /** @type {!KeyboardEvent} */ (event); | 232 var keyboardEvent = /** @type {!KeyboardEvent} */ (event); |
| 233 if (!UI.KeyboardShortcut.eventHasCtrlOrMeta(keyboardEvent)) | 233 if (!UI.KeyboardShortcut.eventHasCtrlOrMeta(keyboardEvent) || event.altKey |
| event.shiftKey) |
| 234 return; | 234 return; |
| 235 | 235 |
| 236 // Ctrl/Cmd + 1-9 should show corresponding panel. | 236 // Ctrl/Cmd + 1-9 should show corresponding panel. |
| 237 var panelShortcutEnabled = Common.moduleSetting('shortcutPanelSwitch').get()
; | 237 var panelShortcutEnabled = Common.moduleSetting('shortcutPanelSwitch').get()
; |
| 238 if (panelShortcutEnabled && !event.shiftKey && !event.altKey) { | 238 if (panelShortcutEnabled) { |
| 239 var panelIndex = -1; | 239 var panelIndex = -1; |
| 240 if (event.keyCode > 0x30 && event.keyCode < 0x3A) | 240 if (event.keyCode > 0x30 && event.keyCode < 0x3A) |
| 241 panelIndex = event.keyCode - 0x31; | 241 panelIndex = event.keyCode - 0x31; |
| 242 else if ( | 242 else if ( |
| 243 event.keyCode > 0x60 && event.keyCode < 0x6A && | 243 event.keyCode > 0x60 && event.keyCode < 0x6A && |
| 244 keyboardEvent.location === KeyboardEvent.DOM_KEY_LOCATION_NUMPAD) | 244 keyboardEvent.location === KeyboardEvent.DOM_KEY_LOCATION_NUMPAD) |
| 245 panelIndex = event.keyCode - 0x61; | 245 panelIndex = event.keyCode - 0x61; |
| 246 if (panelIndex !== -1) { | 246 if (panelIndex !== -1) { |
| 247 var panelName = this._tabbedPane.allTabs()[panelIndex]; | 247 var panelName = this._tabbedPane.allTabs()[panelIndex]; |
| 248 if (panelName) { | 248 if (panelName) { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 * @return {boolean} | 326 * @return {boolean} |
| 327 */ | 327 */ |
| 328 handleAction(context, actionId) { | 328 handleAction(context, actionId) { |
| 329 if (UI.inspectorView.drawerVisible()) | 329 if (UI.inspectorView.drawerVisible()) |
| 330 UI.inspectorView._closeDrawer(); | 330 UI.inspectorView._closeDrawer(); |
| 331 else | 331 else |
| 332 UI.inspectorView._showDrawer(true); | 332 UI.inspectorView._showDrawer(true); |
| 333 return true; | 333 return true; |
| 334 } | 334 } |
| 335 }; | 335 }; |
| OLD | NEW |