Bug 158579 - Web Inspector: Support Command-P for quick open
Summary: Web Inspector: Support Command-P for quick open
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-06-09 13:52 PDT by Timothy Hatcher
Modified: 2016-06-09 19:46 PDT (History)
7 users (show)

See Also:


Attachments
Patch (1.95 KB, patch)
2016-06-09 15:29 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2016-06-09 13:52:04 PDT
To match Chrome Dev Tools, we should support Command-P. This is a stupid shortcut, since Command-P is normally Print. But I have seen some users on Twitter not know we supported Quick Open because the shortcut was different.
Comment 1 Nikita Vasilyev 2016-06-09 13:54:42 PDT
Command-P also matches Sublime Text and Atom, which
is probably why Chrome DevTools chose to use it.
Comment 2 Radar WebKit Bug Importer 2016-06-09 13:57:02 PDT
<rdar://problem/26726751>
Comment 3 Radar WebKit Bug Importer 2016-06-09 13:57:51 PDT
<rdar://problem/26726702>
Comment 4 Nikita Vasilyev 2016-06-09 15:29:04 PDT
Created attachment 280957 [details]
Patch
Comment 5 Nikita Vasilyev 2016-06-09 15:32:45 PDT
View in context: https://bugs.webkit.org/attachment.cgi?id=280957&action=review

> Source/WebInspectorUI/UserInterface/Base/Main.js:261
>      this.openResourceKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Command | WebInspector.KeyboardShortcut.Modifier.Shift, "O", this._showOpenResourceDialog.bind(this));

This property is never used, not even in tests. Why do we use it? Same goes for many other WebInspector._*Shortcut properties.
Comment 6 WebKit Commit Bot 2016-06-09 15:54:22 PDT
Comment on attachment 280957 [details]
Patch

Clearing flags on attachment: 280957

Committed r201891: <http://trac.webkit.org/changeset/201891>
Comment 7 WebKit Commit Bot 2016-06-09 15:54:25 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Darin Adler 2016-06-09 19:33:49 PDT
Comment on attachment 280957 [details]
Patch

Isn’t command-P usually Print?
Comment 9 BJ Burg 2016-06-09 19:46:53 PDT
(In reply to comment #8)
> Comment on attachment 280957 [details]
> Patch
> 
> Isn’t command-P usually Print?

That is often the case, but not always. Previously it was not bound to anything for the Web Inspector window. Xcode and Instruments do not bind it to anything. I don't think there is anything to print in the inspector window itself.

I don't like to use such a prime shortcut that conflicts with Print, but our hands are a bit tied since we don't have our own menu bar / key equivalents that can be targeted by Keyboard pref pane's App Shortcuts. So we have to do what the user is going to expect, which due to Sublime Text's precedent, is command palette or quick open.