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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js

Issue 2649263003: DevTools: restore shortcuts to switch devtool panel left/right (Closed)
Patch Set: made selectNext/Prev read nicer 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/ui/InspectorView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js b/third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js
index 51292fb948ea6522f66e0aad41934a33f9e05622..c9646325538c6d41b180698249f8d6bdc410ac3d 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js
@@ -225,11 +225,14 @@ UI.InspectorView = class extends UI.VBox {
return this._drawerSplitWidget.isSidebarMinimized();
}
+ /**
+ * @param {!Event} event
+ */
_keyDown(event) {
- if (!UI.KeyboardShortcut.eventHasCtrlOrMeta(event))
+ var keyboardEvent = /** @type {!KeyboardEvent} */ (event);
+ if (!UI.KeyboardShortcut.eventHasCtrlOrMeta(keyboardEvent))
return;
- var keyboardEvent = /** @type {!KeyboardEvent} */ (event);
// Ctrl/Cmd + 1-9 should show corresponding panel.
var panelShortcutEnabled = Common.moduleSetting('shortcutPanelSwitch').get();
if (panelShortcutEnabled && !event.shiftKey && !event.altKey) {
@@ -249,6 +252,16 @@ UI.InspectorView = class extends UI.VBox {
}
}
}
+
+ if (event.key === '[') {
+ this._tabbedPane.selectPrevTab();
+ event.consume(true);
+ }
+
+ if (event.key === ']') {
+ this._tabbedPane.selectNextTab();
+ event.consume(true);
+ }
}
/**

Powered by Google App Engine
This is Rietveld 408576698